Answer the question
In order to leave comments, you need to log in
How not to rebuild a docker image every time a file changes?
I just started to deal with docker and I have such a question - the situation is this: I have a project in which I and 1 other person participate, it does not understand Django and I want to make a Docker image that would run the runserver command. I would like to run the container without rebuilding the image on every file change. As far as I understand, access to files outside the docker is possible through volume and tried to specify it in the Dockerfile ( VOLUME .
), but with this line I constantly get an error:
ERROR: for django Cannot start service django: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"apparmor failed to apply profile: open /proc/self/attr/exec: no such file or directory\"": unknown
ERROR: Encountered errors while bringing up the project.
FROM ubuntu:16.04
RUN apt-get -yqq update
RUN apt-get -yqq upgrade
RUN apt-get -yqq install python3.5 python3-pip python3-dev
ADD . /opt/app
WORKDIR /opt/app
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
EXPOSE 8000
CMD ["python3", "./manage.py", "runserver", "0.0.0.0:8000"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question