-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
.env file whit variable with whitespace #6951
Comments
I downloaded docker-compose-1.23.2 trying to reproduce your issue with this minimal setup : docker-compose.yml: version: "3"
services:
test:
image: alpine
command: 'echo hello $FOO !' .env
docker-compose up, both with 1.23 and 1.24 fail to run such a configuration. |
I was getting the same error and i did not use export in .env file. I have defined the variable like this and it worked for me |
remove whitespace between environments |
I want to set the following contents into a .env file which i will use in my docker-compose
It contains a JSON key of a GCP IAM Service Account in it. I want to save that key in an environment variable called But i am getting a How do i bypass this? The Service Account key will certainly have whitespaces and stuff. |
^ Facing the same issue. I have an environment variable that has to have spaces |
I've got the same problem, the issue was in CI/CD config, it was SERVICE_NAME:'value' instead of SERVICE_NAME=value. |
Hey, guys, welcome to the club. Hope soon we can use multiline variables |
Is there any update on this issue? It still doesn't work for me. My env varaible looks like this:
It works if I put everything in one line: |
Same problem: we try to add a JWT key-pair to our project-related .env because all the sensitive information should be in one place. Removing the line-breaks from the base64 string results in an PHP error ("PHP Warning: openssl_sign(): supplied key param cannot be coerced into a private key in /var/www/html/vendor/firebase/php-jwt/src/JWT.php line 209"), and keeping the line-breaks inside the .env results in the above mentioned error.
Edit: Workaround in this case was to replace the line-break by |
@ndeloof Any chance to get this fixed in 2021? |
@srgg This will be fixed by Compose V2 as joho/godotenv#118 is merged. |
When is this going to be fixed?? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Does this fixed? |
This issue has been automatically marked as not stale anymore due to the recent activity. |
I've noticed that - at least with version 2.6.1 - the behavior seems to be back to what it was before.
😐 |
closing this issue as fixed. |
Description of the issue
Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
(Make sure to add the relevant
-f
and other flags)Steps to reproduce the issue
Observed result
This issue occurs in docker-compose 1.24.0
If we rollback to docker-compose 1.23.2 the issue is fixed:
Expected result
Stacktrace / full error message
The text was updated successfully, but these errors were encountered: