I would like to use a prod.conf file in production inside a Docker container. I added this to my Dockerfile:
ENTRYPOINT ["bin/myapp", "-D", "config.resource=prod.conf"]
But I got this error:
Bad root server path: /opt/docker/-D
I get the same error when I try to run the command manually as root
/opt/docker/bin/myapp -D config.resource=prod.conf
If I run
/opt/docker/bin/myapp
It works but using the default application.conf file.
I guess there is no permission issue.
Here is my full Dockerfile:
FROM openjdk:8u121-alpine
WORKDIR /opt/docker
ADD opt /opt
RUN ["chown", "-R", "daemon:daemon", "."]
EXPOSE 9000
USER daemon
ENTRYPOINT ["bin/myapp", "-D", "config.resource=prod.conf"]
CMD []
Edit:
I got the same error locally:
activator clean stage
target/universal/stage/bin/myapp -D config.resource=prod.conf
Bad root server path: /home/me/Documents/MyApp-D
ADD opt /opt
should perhaps beADD /opt /opt
?