I want to add my custom JBOSS_HOME but when i run my dockerfile it give me an error.
JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.
Unable to access jarfile
/home/shri/opt/jboss/wildfly/jboss-modules.jar
MY Dockerfile is:-
FROM jboss/wildfly
MAINTAINER shri
USER root
ENV JBOSS_HOME /home/shri/opt/jboss/wildfly
RUN mkdir -p $JBOSS_HOME
ADD jboss-modules.jar /home/shri/jboss/wildfly/
USER jboss
build dockerfile using:
docker build -t jboss .
Run dockerfile using:
docker run -p 8080:8080 jboss
Dockerfile is fine, It is adding your custom jar file as well, Then where is the Problem?
I think the base image you are using setting working directory. to /opt/jboss and there is a default jboss file. I think by default it is picking this jar file.
Try changing working directory, Add this line (or similar) to your docker file after setting ENV and then try