DevOps Classroom notes 11/Oct/2024

Docker Images, Containers and volumes


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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%