Working with Bind Mounts
- Use below command to create a container with current directory mounted to container, any changes you perform in current directory will reflected inside the container as well
docker container run -it -p 5000:5000 -e FLASK_APP=app.py -e FLASK_DEBUG=1 --rm --name web1 -v $PWD:/app web1
-e =execute command in Docker -p = Define container & host port -it = interactive mode -rm = removes container when it stopped --name = Define container name -v = Define volume
- Inspect container for attached volume
docker container inspect web1