Problem running docker-compose file (but found workaround) #325

Closed
opened 2025-11-13 11:57:00 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @bnachtwey on GitHub (May 10, 2025).

Hi
as it seems, the docker-compose file created is not valid.
Running the installer I get

Starting containers...
ERROR: The Compose file './docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'

A workaround seems to be to skip that name: line and use an environmental setting like:
export COMPOSE_PROJECT_NAME=pangolin

Are there any other / better approaches to cope with this?

I use debian12 with

  • docker 1.5-2
  • docker-compose 1.29.2-3YAML
  • docker.io 20.10.24+dfsg1-1+deb12u1

Thanks & best
BJørn

Originally created by @bnachtwey on GitHub (May 10, 2025). Hi as it seems, the docker-compose file created is not valid. Running the installer I get ``` Starting containers... ERROR: The Compose file './docker-compose.yml' is invalid because: 'name' does not match any of the regexes: '^x-' ``` A workaround seems to be to skip that `name:` line and use an environmental setting like: `export COMPOSE_PROJECT_NAME=pangolin` Are there any other / better approaches to cope with this? I use debian12 with - docker 1.5-2 - docker-compose 1.29.2-3YAML - docker.io 20.10.24+dfsg1-1+deb12u1 Thanks & best BJørn
GiteaMirror added the stale label 2025-11-13 11:57:00 -06:00
Author
Owner

@v1rusnl commented on GitHub (May 11, 2025):

With what command do you start the compose stack? I guess docker-compose up -d? If so, you should really update Docker and all it's bell and whistles to the latest versions. Then it will work. But with docker compose up -d without - Don't rely on the own Debian packages for Docker, they are mostly not up to date. Learned that the hard way years ago for myself.

Install Docker as suggeested here:
https://docs.docker.com/engine/install/debian/

Current versions are 28.1.1 (Docker) and 2.35.1 (Compose). Docker switched from the old docker-compose format to the docker compose plugin path long ago.

@v1rusnl commented on GitHub (May 11, 2025): With what command do you start the compose stack? I guess `docker-compose up -d`? If so, you should really update Docker and all it's bell and whistles to the latest versions. Then it will work. But with `docker compose up -d` without `-` Don't rely on the own Debian packages for Docker, they are mostly not up to date. Learned that the hard way years ago for myself. Install Docker as suggeested here: **https://docs.docker.com/engine/install/debian/** Current versions are 28.1.1 (Docker) and 2.35.1 (Compose). Docker switched from the old docker-compose format to the docker compose plugin path long ago.
Author
Owner

@bnachtwey commented on GitHub (May 11, 2025):

Hi,
thanks for you advise, I'll try so.

I relied on the pangolin documentation, so the error first occurred running the "installer", then when I tried it manually -- as you assumed.

THX & best

@bnachtwey commented on GitHub (May 11, 2025): Hi, thanks for you advise, I'll try so. I relied on the pangolin documentation, so the error first occurred running the "installer", then when I tried it manually -- as you assumed. THX & best
Author
Owner

@v1rusnl commented on GitHub (May 11, 2025):

Hi, thanks for you advise, I'll try so.

I relied on the pangolin documentation, so the error first occurred running the "installer", then when I tried it manually -- as you assumed.

THX & best

Yes, the installer assumes you have one of the latest Docker and Compose versions installed. Remove all docker related debian packages and install Docker via the Docker repo. You have to add the docker repo first to the apt sources list like explained in the link above.

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/debian/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/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

Then install the Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

After that, the error is gone and the installer should not give an error if you reinstall. Also use every docker compose command without a dash, docker-compose with a dash is legacy.

@v1rusnl commented on GitHub (May 11, 2025): > Hi, thanks for you advise, I'll try so. > > I relied on the pangolin documentation, so the error first occurred running the "installer", then when I tried it manually -- as you assumed. > > THX & best Yes, the installer assumes you have one of the latest Docker and Compose versions installed. Remove all docker related debian packages and install Docker via the Docker repo. You have to add the docker repo first to the apt sources list like explained in the link above. ``` 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/debian/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/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update ``` Then install the Docker packages: `sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin` After that, the error is gone and the installer should not give an error if you reinstall. Also use every `docker compose` command without a dash, `docker-compose` with a dash is legacy.
Author
Owner

@Delajeng commented on GitHub (May 21, 2025):

Thanks, this helped!

@Delajeng commented on GitHub (May 21, 2025): Thanks, this helped!
Author
Owner

@bnachtwey commented on GitHub (May 27, 2025):

Hi & Sorry for the delay.

After remove all old docker packages (including docker-compose), it worked :-)

Thanks & best
Bjørn

@bnachtwey commented on GitHub (May 27, 2025): Hi & Sorry for the delay. After remove *all* old docker packages (including docker-compose), it worked :-) Thanks & best Bjørn
Author
Owner

@github-actions[bot] commented on GitHub (Jun 11, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

@github-actions[bot] commented on GitHub (Jun 11, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 25, 2025):

This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.

@github-actions[bot] commented on GitHub (Jun 25, 2025): This issue has been automatically closed due to inactivity. If you believe this is still relevant, please open a new issue with up-to-date information.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#325