Docker-compose up fails after yesterday update, possible regression in 2.25.0-1?


OS: ubuntu 20.04

This morning I just updated my docker stack via apt-get update and moved from docker-ce from 5:25.0.5-1 to 5:26.0.0-1 (and similar updates for docker-ce-cli, docker-ce-rootless-extras), and docker-compose-plugin from 2.24.2-1 to 2.25.0-1. Presumably, these updates were published Yesterday, as reported by my package history.

Before the update, my docker-compose.yml file was read and executed fine when running docker-compose up

Just after the update however, I got this error, which I managed to fix by reverting to the previous docker versions as described above:

ERROR: for 7800d92023e9_ghost-db  'ContainerConfig'

ERROR: for e2f4ce4be5d2_ping  'ContainerConfig'

ERROR: for ghost-db  'ContainerConfig'

ERROR: for ping  'ContainerConfig'
Traceback (most recent call last):
  File "docker-compose", line 3, in <module>
  File "compose/cli/", line 81, in main
  File "compose/cli/", line 203, in perform_command
  File "compose/metrics/", line 18, in wrapper
  File "compose/cli/", line 1186, in up
  File "compose/cli/", line 1182, in up
  File "compose/", line 702, in up
  File "compose/", line 108, in parallel_execute
  File "compose/", line 206, in producer
  File "compose/", line 688, in do
  File "compose/", line 581, in execute_convergence_plan
  File "compose/", line 503, in _execute_convergence_recreate
  File "compose/", line 108, in parallel_execute
  File "compose/", line 206, in producer
  File "compose/", line 496, in recreate
  File "compose/", line 615, in recreate_container
  File "compose/", line 334, in create_container
  File "compose/", line 922, in _get_container_create_options
  File "compose/", line 962, in _build_container_volume_options
  File "compose/", line 1549, in merge_volume_bindings
  File "compose/", line 1579, in get_container_data_volumes
KeyError: 'ContainerConfig'
[9769] Failed to execute script docker-compose

NB: I did clean up all cached containers, even rebooted the machine for good measure. This seems to be a regression of some sort introduced in March 21st update of the docker stack.

Anybody has any thoughts about this?

Edit: possibly related => api: Deprecate `Container` and `ContainerConfig` for `/images/{id}/json` by vvoland · Pull Request #46939 · moby/moby · GitHub

Thanks a lot

docker-compose-plugin was downgraded? Maybe it is incompatible with the latest Docker version?

Sorry, my bad, the order is reversed: docker-compose-plugin went from from 2.24.2-1 to 2.25.0-1 (fixed in the original message now). I then reverted it to 2.24.2-1 to fix the problem (also all the other packages were reverted).

Did you check compose issues?

Yes, I did not find anything related, at least the search for “ContainerConfig” does not return anything recent. Perhaps I should add an issue then.

For me I had to switch from docker-compose to docker compose (without the -) to get it back to a working state.
But it recreated the containers with new names as the naming convention for the containers is slightly different between docker-compose and docker compose. Keep this is mind if you reference containers by their names.

Just a tiny note:

The python stack trace indicates that you used docker compose v1, which was deprecated after June 2023. It is to be expected that it eventually became incompatible with newer Docker API versions.

1 Like

IT can be so complex :rofl:

As the others have stated, you have the latest docker-compose-plugin installed, but you are calling the old docker-compose and not docker compose :slight_smile:

Also working in Ubuntu 20.04 and just tried installing docker-ce=5:26.0.0-1~ubuntu.20.04~focal, and the process fails to start the docker.service.

Had to revert to 5:25.0.5-1~ubuntu.20.04~focal to get it working again and things launched with no problem.

Quick update on my side: using docker compose instead of docker-compose indeed fixes everything (to avoid a warning, you have to remove the “version:3” mention at the beginning of the docker-compose.yml, since this is not needed anymore with the new docker-integrated compose system).

I guess I must have missed the memo about the new dash-free docker compose revolution! :wink:


docker compose up -d

instead of:

docker-compose up -d