LoginSignup
1
1

More than 1 year has passed since last update.

docker-compose upで"container is marked for removal and cannot be started"が発生した時の対処法

Posted at

docker-composeのコンテナを追加したり削除したりなど、あれこれ触っていたら、以下のエラーが発生。

Starting xxxxxxx ... error

ERROR: for xxxxxxx  Cannot start service xxxxxxx: container is marked for removal and cannot be started
ERROR: Encountered errors while bringing up the project.

コンテナのstatusがDead状態になっているとこのようなエラーになる。

$ docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED          STATUS                          PORTS                                       NAMES
c1ccedaf35fc   xxxxxxx   "docker-entrypoint.s…"   29 minutes ago   Dead                            0.0.0.0:3030->3000/tcp, :::3030->3000/tcp   xxxxxxx

コンテナを削除すれば解決。

$ docker rm c1ccedaf35fc
1
1
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
1