-
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
"variable is not set. Substituting a blank string." being shown when env variables from links used in directives #2123
Comments
This is also reproducible if the
Seems like command string is being evaluated or something by |
This is due #1377. For your case double |
I think maybe we should document this error explicitly, I suspect a few more people will hit this on release. It should only apply to variables in the config though, not the |
@dnephin My bad. It's not hitting Dockerfile. I had replicated the command in the |
@villlem
What is the recommended way? I'm using whatever I read in the docs |
@shrikrishnaholla: Docker populate /etc/host inside container with names from link and also do not change ports. But documentation is confusing. See https://docs.docker.com/compose/env/ for details. I would just remove port and replace address with name from
This should also works. I'm not on computer with docker right now
|
Oh! Didn't know this. Thanks @villlem ! |
C:\Users\bundalla\Desktop\advancelaravel54\laradock>docker-compose up -d nginx mysql |
Please see https://docs.docker.com/compose/environment-variables/. Link environment variables would need to be escaped with |
I'm working with master (which is currently at dabf1e8), and while building or starting, I'm getting the above warning, and those commands won't work
Ex: I am using a service
Here, since the env variable
REDIS_PORT_6379_TCP_ADDR
is obtained because of linking, and it's non-existent when building, or before starting theredis
service, I can't use this service. It substitutes the value with an empty string.The text was updated successfully, but these errors were encountered: