Docker-compose up fails

I am attempting to update ayon server to latest but I am getting this error when running sudo docker-compose pull

<admin>:~/ayon-docker$ sudo docker-compose pull
Pulling postgres ... done
Pulling redis    ... done
Pulling server   ... done
<admin>:~/ayon-docker$ sudo docker-compose up --build --detach
Recreating b37a45019324_ayon-docker-redis-1 ...
Recreating 963d50240ce3_ayon-docker-postgres-1 ...

ERROR: for b37a45019324_ayon-docker-redis-1  'ContainerConfig'

ERROR: for 963d50240ce3_ayon-docker-postgres-1  'ContainerConfig'

ERROR: for redis  'ContainerConfig'

ERROR: for postgres  'ContainerConfig'
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 33, in <module>
    sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
    command_func()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 203, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3/dist-packages/compose/metrics/decorator.py", line 18, in wrapper
    result = fn(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1186, in up
    to_attach = up(False)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1166, in up
    return self.project.up(
  File "/usr/lib/python3/dist-packages/compose/project.py", line 697, in up
    results, errors = parallel.parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/project.py", line 679, in do
    return service.execute_convergence_plan(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 579, in execute_convergence_plan
    return self._execute_convergence_recreate(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 499, in _execute_convergence_recreate
    containers, errors = parallel_execute(
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 108, in parallel_execute
    raise error_to_reraise
  File "/usr/lib/python3/dist-packages/compose/parallel.py", line 206, in producer
    result = func(obj)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 494, in recreate
    return self.recreate_container(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 612, in recreate_container
    new_container = self.create_container(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 330, in create_container
    container_options = self._get_container_create_options(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 921, in _get_container_create_options
    container_options, override_options = self._build_container_volume_options(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 960, in _build_container_volume_options
    binds, affinity = merge_volume_bindings(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1548, in merge_volume_bindings
    old_volumes, old_mounts = get_container_data_volumes(
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1579, in get_container_data_volumes
    container.image_config['ContainerConfig'].get('Volumes') or {}
KeyError: 'ContainerConfig'

Any help would be appreciated

Could you try running
docker compose down (to remove the original containers)
and then docker compose up -d (to create new ones) ?

Note that docker-compose script is deprecated for a while in favor of docker compose plugin docker compose without the hyphen.

It seems this problem randomly started to appear recently with a docker update. Mentioned here for example: ERROR: for teslamate 'ContainerConfig' - after updating to v1.28.5 · teslamate-org/teslamate · Discussion #3776 · GitHub

If this helps and it becomes a common issue, i could add an additional target (such as make rebuild) to enforce container re-creation.

2 Likes

Yes I was reading about the change to compose last night. Thank you for the info.
Just as an FYI the documentation in the release notes for the server needs to be updated as I was just following that:
image

Also, the main documentation advises to use the “build” option, when doing updates :

docker compose up -d --build

1 Like