I am trying to create a Dockerfile for an app which I want to run inside the docker. I am running the app using the command activator run.
and this command is inside the file structure
xyz\Desktop\ffa_predix\activator-1.2.10
.
So, I have gone inside the file and put my Dockerfile there with the following content.
FROM jboss/base-jdk:7
RUN mkdir -p /ffa_app
COPY . /ffa_app
WORKDIR /ffa_app
CMD ["activator" , "run"]
EXPOSE 9000
But after going to the second line it's giving me the error:
mkdir: cannot create directory '/ffa_app': Permission denied.
The user set by the base image is jboss
, so you have 2 options:
mkdir -p ~/ffa_app
USER root
at the top of your Dockerfile, after the FROM
statementNeedless to say, I'd recommend sticking to a user with lower privileges.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With