docker Flashcards
learn about docker
how to you check docker version
docker -v
What is the command docker ps
It checks if a conntainers are running
How do you check an image
type docker images
What is a dockerfile?
simple text file which contains instructions to build an image.
What is the difference between run and cmd in dockerfile?
Run executes during building.
CMD executes only when you create a container out of the image.
what command used to build image
docker build -t
how do you give image name
use imageName:tageName “location of Dockerfile”
What is the purpose of compose in Docker
With docker compose you can run multiple containers networked with each other at once.
This is done through yaml file using command
docker-compose.yml