Error Launching Services: KeyError: 'ContainerConfig'

Well it took some figuring out…

Firstly Local Docker Compose version was old, server version was new! Updated local version to match server version (latest version). Then Wappler won’t build/deploy as it requests sudo for the user (which can not be entered). So on to figuring out how to do it manually through the Terminal.

docker compose up —compatibility

Gave me an error:

no such service: —compatibility

OK… More coffee!

Lets try:

docker compose up

First try it gave me another error about renaming the container or removing it…

docker compose down

This removed the offending container! Semi-success!

Then had to run:

docker compose build

This built my new container!

Now I run:

docker compose up

This pushed the container to Digital Ocean.

And… My changes were applied!

Problem now is with the local/remote docker environment which Wappler can’t communicate with as it requires sudo permissions which can not be entered, so switched to Portainer on the local network and fired it up manually.

Scruffy I know, but it works!

@Heather_Mann @George

:smiley:

Oh yeah…

Also had to remove ‘version’ from the docker-compose-yml file!

Once you update the local docker compose version WARNING Wappler will not deploy locally or remotely ANY docker containers across the board! You WILL have to use the above method until a fix is in place for this issue!! You will have to start your local containers with Portainer or from the Terminal. And remote containers as outlined above…

UPDATE.
Very odd behaviour (or by design but no idea)… You CAN have an older version of docker compose running on Digital Ocean and still compose/build with a newer version locally (using the Wappler Deploy button)… We have just had to update another Project that does not have the latest version of Docker compose but it deploys just fine. Local build throws a bit of a wobbly though but the container is still launched.

My brain hurts!

:confounded:

Guess you learn something new everyday eh!!

Mine, too, and I haven’t even upgraded yet. :smiley: I’m going to wait this one out until you fix everything.

1 Like

The Wappler update itself is not the issue just incase we gave the wrong idea. Our issue came when one of our droplets updated Docker and its associated tools, totally by coincidence on the same day as the Wappler update, which initially lead to the idea that 6.4.0 caused the issue we experienced. Was strange that only one of our Droplets updated as we have multiple on Digital Ocean and some are yet to update to the latest version. At least we know how to work around it now. No doubt in-time this will cause issues with everyone using Docker as they themselves update either manually or scheduled.

I’ve actually made it sound more difficult than it is. Its really quite simple. Well that is what I have now told myself hahahaha…

:slight_smile:

1 Like

So to summarize, you had problems just with newest docker on your remote server? Which version was it? And how did it got updated?

Evening George,
Our remote server updated via an automated script we run for Ubuntu. Essentially just a bash script containing:

apt update
apt upgrade
shutdown -r

This in turn updated Docker and its components including Compose on the remote server.

The original Compose version that was working remotely was version v2.18.1 and the updated version is version v2.25.0.

Locally we were running version v2.18.1. But this caused an issue as it used the older docker-compose and not the new docker compose whcih our server expected after the update.

We updated locally on Ubuntu 22.04.4 LTS following the guidelines here.

Which are as follows:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Then running:

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Hope that helps?

So what was your new docker version on your server? Seems your docker update procedure is not correct.

We use from Wappler to setup a remote server with docker just:

udo apt-get -y install docker.io

and this currently gives us:
docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1

which works perfectly and for publishing and docker-compose…

The remote and local versions are the same:

Docker version 26.0.0, build 2ae903e

We used the absolute standard for updating Ubuntu so it is not our procedure it is that of Apt iteself. We did not set any specifics solely:

apt update
apt upgrade

This applied the updates. We have done this hundreds of times. There are no other commands involved.

well straingely enouph, tried also docker 26 but got different docker compose version and all is working fine:

# docker -v
Docker version 26.0.0, build 2ae903e
# docker compose version
Docker Compose version v2.17.2

The packaging updates include compose 2.25.0 so this is what you should have according to the release notes:

Screenshot from 2024-03-29 22-11-35

Our environments both local and remote match this exactly. It appears you only updated the Docker Engine itself and not all of the updated packages associated with it…?

well on the server you actually need only the docker engine. The rest is not used by us. Even docker compose is not needed on the server as you are not publishing anything from it but only to it from your local machine.

Then why did we have the error after the remote apt update? Prior to that everything was fine. We installed the Wappler update and then later in the day the apt update to the server. The server version changed and the error occurred in Wappler there after. That doesn’t make any sense at all. My local machine would not publish to the remote server without the updates applied locally to match that of the remote server. Others will have the same issue when they update their Droplets on Digital Ocean using apt. Or they update Ubuntu and then the Docker updates will be applied to their systems too.

well beats me. I just created two brand new servers on both digital ocean and hetzner with docker 25 and 26 and deployment to them worked just fine out of the box.

Now follow (on the remote server to mirror what the apt update did):

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

And see what happens…

Remember this was done automatically simply with apt update / apt upgrade. Not manually! Only manually locally to match the remote environment after the error occurred.

I still think that this is related more to your local docker version that you do the deploy with, than your remote docker version.

Weren’t you on linux and what version of docker are you running locally?

George it happened on the server first! We had to do it locally as docker-compose was replaced with docker compose (on the remote server). It was not our local environment which instigated the error.

Docker version 26.0.0, build 2ae903e

Which we had to update locally to match the remote server after the error arose.

well yes but it is just that we don’t use docker compose on the server. It is used only from your local machine to deploy to the server, but it is not executed on the server…

The server updated first and then docker-compose (locally) no longer deployed as the server was expecting docker compose. So something is happening there. I repeat the server updated first then the error. There is a connection.

Update docker compose on the remote server then try to deploy from Wappler and you will get the same error as me and Heather.

In the next update we will be shifting to the new docker compose command per default.

There will be also a global option to still use the old docker compose v1 but that is only needed for very old local docker desktop installations.

1 Like