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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

command to re-build an image and run a container

A

docker-compose up –build

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Command to stop and terminate the container

A

docker-compose down

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly