Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Command] warden env start #739

Closed
pczerkas opened this issue Jan 22, 2024 · 14 comments
Closed

[Command] warden env start #739

pczerkas opened this issue Jan 22, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@pczerkas
Copy link

Version of Warden

in-dev (commit 6f650ec)

Operating System and Installation Method

Ubuntu 20.04.6 LTS, docker ce 25.0.0, installed using "Alternative Installation" from https://docs.warden.dev/installing.html#alternative-installation

Describe the Bug

Started to happen on docker ce version 25.0.0:

$ warden env start
validating /opt/warden/environments/includes/varnish.base.yml: services.nginx.labels array items[2,7] must be unique

what helps is to downgrade docker-compose-plugin from version 2.24.1-1~ubuntu.20.04~focal to version 2.21.0-1~ubuntu.20.04~focal (or downgrade whole docker from 25.0.0 to 24.0.7)

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

No response

Additional context

No response

@mattijv
Copy link
Contributor

mattijv commented Jan 22, 2024

Some more info in #740

@pczerkas
Copy link
Author

pczerkas commented Jan 22, 2024

moby/moby#47122
docker/compose#11371
compose-spec/compose-go#533

@mattijv
Copy link
Contributor

mattijv commented Jan 22, 2024

So if I interpret the issues linked by @pczerkas correctly, this problem should be fixed in the next version of docker compose is released, and is not an issue with Warden at all.

@mattijv
Copy link
Contributor

mattijv commented Jan 23, 2024

BTW commenting out the last two labels in the varnish.base.yml service definition is an effective workaround if you do not feel like downgrading docker compose.

@iranimij
Copy link

BTW commenting out the last two labels in the varnish.base.yml service definition is an effective workaround if you do not feel like downgrading docker compose.

It didn't work for me

@pczerkas
Copy link
Author

Quick fix sometimes doesn't work when there are customizations in .warden directory.

@iranimij
Copy link

I removed the whole file (/home/linuxbrew/.linuxbrew/Cellar/warden/0.14.1/environments/includes/varnish.base.yml) and it worked

@mattijv
Copy link
Contributor

mattijv commented Jan 30, 2024

Removing the file is certainly effective, but personally I'd maybe not recommend it, as it will probably break other things.

Looks like the issue will be fixed in the latest version of docker compose (v2.24.4). (Did not test, as that version does not yet seem to be available in the apt repo.)

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jan 30, 2024

I can confirm that after manual upgrade docker-compose-plugin to 2.24.4, the issue is gone.

However, for those who use Docker Desktop for Mac, it's automatically replaces the docker compose plugin when you restarting it, which isn't good.
The workaround for Mac is downgrading Docker Desktop to version 4.26.1

So I would summarize:

  • For those on Mac - downgrade Docker Desktop to Docker Desktop to version 4.26.1
  • For those on other OS:
    - upgrade docker-compose-plugin to latest version (at least to 2.24.4) if it's available
    - downgrade to version below 2.24.1

@SamJUK
Copy link
Contributor

SamJUK commented Jan 30, 2024

Work around for ubuntu while apt version is still behind. Should be a simple case of removing the profile export once the apt version is back up to date

VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | grep -Po '"tag_name": "\K.*\d')
DESTINATION=/usr/local/bin/docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
sudo chmod 755 $DESTINATION
echo "export DOCKER_COMPOSE_COMMAND=\"$DESTINATION\"" >> ~/.profile

@hassanas
Copy link

Any update here? how I can properly fix my project from last two days its not working ?

@mattijv
Copy link
Contributor

mattijv commented Jan 31, 2024

@hassanas There are multiple workarounds in the thread. It's not an issue in Warden, but in docker compose.

Until there's an official release of the fixed docker compose version for your platform/installation method of choice, any of the workarounds should suffice.

@mattijv
Copy link
Contributor

mattijv commented Feb 1, 2024

Just confirming that the latest Ubuntu release of docker-compose-plugin (2.24.5-1~ubuntu.22.04~jammy) has fixed this issue for me.

@hassanas
Copy link

hassanas commented Feb 1, 2024

Yes issue resolved on updating to new version:-

hassan@hassan-Creator-15-A10SFS:~$ docker compose version
Docker Compose version v2.24.2

hassan@hassan-Creator-15-A10SFS:~$ docker compose version
Docker Compose version v2.24.5

please close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants