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?

dockerのバージョンアップ後、docker-compose up -d --buildなどでコンテナを再起動しようとした際に以下のようなエラーが発生

Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 81, in main
  File "compose/cli/main.py", line 203, in perform_command
  File "compose/metrics/decorator.py", line 18, in wrapper
  File "compose/cli/main.py", line 1186, in up
  File "compose/cli/main.py", line 1182, in up
  File "compose/project.py", line 702, in up
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/project.py", line 688, in do
  File "compose/service.py", line 581, in execute_convergence_plan
  File "compose/service.py", line 503, in _execute_convergence_recreate
  File "compose/parallel.py", line 108, in parallel_execute
  File "compose/parallel.py", line 206, in producer
  File "compose/service.py", line 496, in recreate
  File "compose/service.py", line 615, in recreate_container
  File "compose/service.py", line 334, in create_container
  File "compose/service.py", line 922, in _get_container_create_options
  File "compose/service.py", line 962, in _build_container_volume_options
  File "compose/service.py", line 1549, in merge_volume_bindings
  File "compose/service.py", line 1579, in get_container_data_volumes
KeyError: 'ContainerConfig'

version

docker 20.10.9 -> 27.0.2に上げてから発生

docker : Docker version 27.0.2, build 912c1dd
docker-compose : docker-compose version 1.29.2, build 5becea4c

原因

どうやらコンテナを一度立ち上げたままの状態で再度upしようとすると発生している様子?
-> downしてから再度upすることで解決
--rmi all --volumes --remove-orphans : down + image,volume,未定義コンテナの削除

# docker-compose down --rmi all --volumes --remove-orphans
# docker-compose up -d --build

ref : https://askubuntu.com/questions/1508129/docker-compose-giving-containerconfig-errors-after-update-today

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?