4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Dockerで色々リセットする方法

Last updated at Posted at 2022-04-07

コンテナ起動・停止

$ docker-compose up --detach
$ docker-compose down

Dockerの初期化

$ docker stop $(docker ps -q) //①全コンテナ停止
$ docker ps -aq | xargs docker rm //②全コンテナ削除
$ docker volume rm $(docker volume ls -qf dangling=true) //③全ボリュームマウント全削除
$ docker images -aq | xargs docker rmi //④イメージ全削除
// ①~④一括
$ docker compose down --rmi all --volumes --remove-orphans

ボリューム削除(特にDatabase)

$ docker volume ls
$ docker volume rm xxxxxx
$ docker system prune -a --volumes
4
2
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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?