docker-compose Flashcards
1
Q
command to build an image and run a container
A
docker-compose up
docker-compose up -d –for daemon mode
2
Q
command to re-build an image and run a container
A
docker-compose up –build
3
Q
Command to stop and terminate the container
A
docker-compose down
4
Q
docker-compose restart policies
A
always: Always restart, if container exited with code 0
on-error: restart, if container exited with code other than 0
5
Q
docker-compose command equivalent to “docker ps”
A
docker-compose ps – does the same work as docker ps, but should be run from “docker-compose.yml” file directory, else won’t run