1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【早見表】よく使うDocker コマンド

1
Last updated at Posted at 2021-02-11

よく使うので自分の備忘録として

コンテナを立ち上げる

$ docker-compose up -d 

コンテナ内のappに入る

$ docker-compose exec app bash

イメージの一覧が確認

$ docker images

イメージの削除

$ docker rmi <image ID> 

ボリュームの一覧が確認

$ docker volume ls

ボリュームの削除

$ docker volume rm <volume ID> 

コンテナイメージとボリュームを一度全部消してから再度 docker-compose up -d してみてください。
(消すときは事前に docker-compose down でコンテナを停止した状態で行ってください)

起動しているものと起動していないもの、全てのコンテナの一覧をみれる

$ docker ps -a

ログ出力

$ docker attach CONTAINERID
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?