Skip to content

Instantly share code, notes, and snippets.

@holms
Last active April 9, 2018 05:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holms/d740b2ae366cd3cd322fb44e100c2d34 to your computer and use it in GitHub Desktop.
Save holms/d740b2ae366cd3cd322fb44e100c2d34 to your computer and use it in GitHub Desktop.
docker-compose run hostname doesn't work

I've been searching for this all over the internet too. All you need is to add name for your container and it will be available for othre containers:

docker-compose run --name mycontainer mycontainer <whatever-command-here>

This was exact reason why depedencies couldn't connect to app container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment