Command docker-compose

Super basic command

Show running containers


docker-compose ps
docker-compose ps -a #Full display including stopped container

Start container


docker-compose start (up -d is okay)

Create and start a container


docker-compose up
docker-compose up -d #Run in the background

Stop the running container


docker-compose stop

Build image


docker-compose build

Creating a container


docker-compose create

Destroy the container


docker-compose down

Connect to container


docker-compose exec container name bash

View log


docker-compose logs container name

A little application

Find out which environment variables are available in the service


docker-compose run service name env

Destroy the container and destroy the image


docker-compose down --rmi all

Recommended Posts

Command docker-compose
Docker-compose command memo
Frequently used docker-compose command
Command Pattern
Docker command
try docker-compose
Docker-compose ~ volume trap ~
Memorandum docker command
Docker command list
Heroku command summary
docker basic command
Design pattern ~ Command ~
Docker command summary
nginx start command
Docker command memorandum
[Docker] Command summary
EC2 on Docker-compose
(Git) Basic command
The command specified by docker-compose takes precedence over Dockerfile