-
Notifications
You must be signed in to change notification settings - Fork 576
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
Getting a REDIS_PORT env set to tcp://IP:6379 instead of 6379 #53
Comments
This is coming from Docker's linking feature (https://docs.docker.com/engine/userguide/networking/default_network/dockerlinks/#environment-variables):
The solution I'd probably recommend right now is to use Docker's new networking features (https://docs.docker.com/engine/userguide/networking/dockernetworks/#user-defined-networks) to link containers together, which will allow for transparently supporting Docker Swarm and thus multi-host networking, but will also prevent these extra environment variables from being set. |
same issue... |
As I noted above, this is a feature of Docker itself (when using |
This kind of feature should not be enabled by default, I think. It takes me about 1 hour to track down why the hell my container has REDIS_PORT environment variable automatically... Thanks @tianon for explanation. |
This took me all day to see why my variable is override when running in Gitlab CICD with Redis as a service, it's linked with my job and cause the problem. I was having a headache until reading this answer 💯 |
…into Jiefei-Wang-change_env - DO NOT support tcp://... -- this seems to be an artifact of docker, rather than a 'feature' redis/docker-library-redis#53 - allow `.error()` and friends to work when `x` is missing - use NA rather than "" in withr::with_envvar() to unset environment variable
Hi,
When linking this container with php, I'm getting a REDIS_PORT env being set to tcp://IP:6379 instead of 6379, which just gives me error after error about tcp://172.17.0.7:tcp://172.17.0.7:6379 not existing, which of course it doesn't. Any way we can actually make it a port by default?
At the moment I have to run my containers with -e "REDIS_PORT=6379".
Cheers
The text was updated successfully, but these errors were encountered: