Skip to content
Advertisement

Using bind mount in Docker (Ubuntu 20.04)

I am really new to Linux and Docker, and i want to not rebuild docker image after every change of my code. I read, that you can use bind mount, but i can’t understand it’s syntax and usage. My Python files with Dockerfile is located at /etc/python-docker

Advertisement

Answer

You can mount your python files inside the container with the -v flag.

docker run -v /etc/python-docker:/path/inside/the/container image-name

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement