Docker Images, Containers and volumes
- Refer Here for article on image layers and Refer Here for impact of image layer and Refer Here for volumes
- Dockerfile instruction VOLUME: Refer Here
ARG and ENV
- ARG can be used as a parameter while building images Refer Here
- ENV can be used as a parameter while running containers Refer Here
.dockerignore
Lets run a postgres database inside a container
- Lets create a postgres database with password, user, database and volume mounting (refer classroom video for commands)
docker run --name lib-db -d -e 'POSTGRES_PASSWORD=password' -e 'POSTGRES_USER=lt' \
> -e 'POSTGRES_DB=library' -v lib-vol:/var/lib/postgresql/data postgres:17
Exercise
- Run mongodb, mysql and microsoftsqlserver with volumes in a contianer
