Docker compose comandos básicos Flashcards

1
Q

Qual o comando do Docker que…

Cria e inicia os containers definidos no arquivo docker-compose.yml

A

docker compose up -d

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

Qual o comando do Docker que…

Para e remove os containers, redes e volumes definidos no arquivo docker-compose.yml, executados pelo comando “up”

A

docker compose down

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

Qual o comando do Docker que…

Constrói ou reconstrói as imagens dos serviços definidos no arquivo docker-compose.yml

A

docker compose build

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

Qual o comando do Docker que…

Para os containers sem removê-los

A

docker compose stop

Pode ser usado para parar todos os containers ou um container específico

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

Qual o comando do Docker que…

Inicia os containers que foram parados, mas que ainda existem

A

docker compose start

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

Qual o comando do Docker que…

Para e reinicia os containers

A

docker compose restart

Útil para atualizar configuração sem precisar remover os containers

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

Qual o comando do Docker que…

Exibe os logs dos containers

A

docker compose logs

Use docker compose logs -f para seguir os logs em tempo real

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

Qual o comando do Docker que…

Executa um comando em um container em execução

A

docker compose exec -it [container-name] [command-name]

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