Docker-compose issues


i havent updated my server for about 2 months due to some travels and beeing sick.
So today was the day when i wanted so update everything and i ran into some issues.

I am running ubuntu 22.04.

updated with:

apt update
apt full-upgrade -y

everything went ok.
pulled the newest docker volumes with:

docker-compose pull

everthing was downloaded normaly.

After that i tryed to run my docker-compose file (seperatly for every container) with:

docker-compose up -d container

and here i get errors, for all of the containers…

ERROR: for unbound  'ContainerConfig'

ERROR: for unbound  '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'
[27062] Failed to execute script docker-compose

i checked if docker compose is running with:

docker compose version

getting back:

Docker Compose version v2.25.0

if i run

docker-compose version

i get back:

docker-compose version 1.29.2, build 5becea4c
docker-py version: 5.0.0
CPython version: 3.7.10
OpenSSL version: OpenSSL 1.1.0l  10 Sep 2019

do i have two docker compose versions running?
How do i fix this?

I am a linux newbie… so i apologize in advance…

Some help would be highly appreciated, let me know if you need more context.

Thank you in advance.

Yes, by not using docker compose v1, which was deprecated after June 2023.
So instead of docker-compose (=v1) use docker compose (=v2)

1 Like

so i just run

docker compose up -d container


v2 is a docker cli plugin, designed as a drop-in replacement.

Thanks for the help!