-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Error when using docker-compose exec command after updating to Docker Desktop 2.2.0.0 on macOS #7180
Comments
Thanks, this looks like the same as #7170 ? |
It throws a different error on different file/line, so I decided to open a new issue. |
Thank you for reporting @danielmartincmp ! |
I've just tried in another macbook with same versions and same projects and I cannot reproduce it. I won't share any private project compose files here due to sensitive data, but I'll try to find a public one where I can reproduce the error. |
Tried to reproduce the error in my working laptop with other project but couldn't. It seems that the Here the config causing the failure, I just modified it a bit to not expose sensitive data:
|
I ran into this bug too. Arch Linux, It doesn't appear in 1.25.0. There is the same Traceback, just line numbers are a bit different : Traceback
|
It seems like I've found what caused the error in my case. It was the @ulyssessouza I assume that it would be nice if the user would get clear message about such type of errors in the @yeclense you didn't provide your
|
Hi, quite useful feedbacks the last ones. @hrayr-artunyan your message made me search in our project and yes, we have a So after removing this file or setting there a I would say that there should be some kind of checking on this so that we can still work as we where doing before the last update, which means not forcing to have a specific format on this Thanks guys for the help! |
Was able to reproduce this with this minimalist file structure. https://github.com/derwentx/docker-compose-test The issues is from having the following lines under your service in docker-compose:
and an
where you would usually expect
I think there should be clearer warnings about this, since a beginner user would have no idea that this is because of an empty env file. |
We face the same issue and, although having values for the keys fixes the issue, there is one scenario that has not been covered: passing environment variables that are already set from the host to a container. For this scenario, let's have the following
Running the command below will pass the value of the environment variable from the host to the container. MESSAGE="HELLO, WORLD" docker run --rm --env-file .env alpine sh -c 'echo ${MESSAGE}' This scenario is very useful for CI/CD server where the environment variables are set and we can provide a Before the latest version of Compose, passing services:
alpine:
image: alpine
env_file: .env
environment:
- MESSAGE_2=${MESSAGE} Now, this fails because for some reasons, Compose does not accept keys-only Passing a different file like Is this an intended breaking change? or simply a bug? |
I have same use-case as @flemay , we use "key-only" env files heavily to define sets of variables which should be included from host env to containers with like 40 keys where. really helps for local development setups. this case is broken now, will it work same if we just provide and it only breaks on UPD: it does not work the same if we prodive |
@dikderoy Yes, |
Thank you for the feedback! I'm debugging it now. |
Thank you so much @ulyssessouza ! |
https://github.com/docker/compose/releases/tag/1.25.4-rc2 Should include the fix. |
I've quickly tested the Compose version Well done, @ulyssessouza ! |
The issue is closed but I'm leaving this comment in case someone ends up with the same issue like me. On my case I had a colon (don't ask me how) instead of a equal sign in my
|
Yeah, my compose file no longer works because of this error. I don't even have a .env anywhere. docker-compose version 1.25.5, build unknown This sucks I'm on Ubuntu 20.04 btw |
|
Had the same error on Ubuntu 20.04 LTS with:
The problem was a missing |
Description of the issue
Same error while executing
docker-compose exec
command no matter in with config or command to execute in container.Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Observed result
Expected result
Execute the desired command in the selected container and output the result
Stacktrace / full error message
Tried with any Python verson I could install via python installer or via brew. Result keeps being the exact same one.
Here a stacktrace I could get with more detailed info:
Additional information
OS version / distribution,
docker-compose
install method, etc.macOS Catalina (10.15.2), Docker Descktop Community 2.2.0.0
The text was updated successfully, but these errors were encountered: