-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Environment Variable is not set. Defaulting to a blank string. #5003
Comments
Do you see |
@shin- correct, I can see it in the output of printenv.
I tried to capitalize it as well, just in case. |
My present work around is a script like this
I set |
Yeah, it should work fine. If you open a |
Yes, I see them too
|
I'm having the same issue, a variable like |
I updated my compose and docker info in the original question, if it helps |
@sebas5384 @rommik 1.9.0 is pretty old as far as |
@shin- wow! I should have started with that . Thanks :) it is the version of compose file....! 1.14.0 works as expected. |
@shin- Didn't work either, even passing the variables like you said.
version: '2.2'
services:
database:
image: mysql:5.6
container_name: 'project-fsi-db'
volumes:
- ${PWD}/.mysql/:/var/lib/mysql
I can't understand what is happening, why a variable like |
@sebas5384 In that specific example, replacing I tried reproducing the issue locally (with 1.13 as well) but it works fine for me. Did you make sure $PWD is actually defined locally (i.e. shows up |
@shin- the problem is that I need to load other variables to the docker-compose file. Yes! they are, all the variables are defined and listed in the
We are doing a workaround re-declaring the variables into the .env, but this isn't what we would like to do since each environment has it's own PWD, etc... BTW: thanks for your help ;) |
I observe the same problem as @sebas5384 , running docker-compose 1.14 on MacOS against docker 1.12 running in a virtualbox (Ubuntu Trusty). The |
@daten-kieker Are you using |
@shin- No, no |
I am having the same issue. any updates on this? |
I don't understand why someone hasn't modified python's variable substitution code to map |
I also have an issue with variables in
Run using:
Working fine if I pass variables in
Not working if I try to set them in named env file
In each scenario,
|
In my case, after updating my docker-composer version to the last one (1.18.0, I was using before 1.14.0, so no suspicion of being the problem, but just in case) and being doing test for a while. Then I realized that my problem came that I have my I have something like:
I write it down because I guess it could be enlightening for others. |
@barraquito so how to pass an ENV variable if you are using |
@olegstepura in my case, after a first quick research didn't find how to pass the ENV variable to the |
That might be an issue to |
@olegstepura You can do |
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. |
This issue has been automatically closed because it had not recent activity during the stale period. |
A similar question has been floating around stackoverflow and github. Yet, I am not able to solve this problem, I hope somebody can point me in the right direction.
lsb_release
docker-compose -v
docker-compose version 1.9.0, build 2585387
docker -v
Docker version 17.05.0-ce, build 89658be
/etc/environment
/etc/sudoers
In my docker compose, I'd like to pass both http_proxy and https_proxy as e vars.
on docker-compose up I get
WARNING: The http_proxy variable is not set. Defaulting to a blank string.
I get the same error with any variables in
env
list.What am I doing wrong?
The text was updated successfully, but these errors were encountered: