Skip to content

Instantly share code, notes, and snippets.

@wsargent
Last active June 29, 2024 19:32
Show Gist options
  • Save wsargent/7049221 to your computer and use it in GitHub Desktop.
Save wsargent/7049221 to your computer and use it in GitHub Desktop.
Docker cheat sheet
@saulshanabrook
Copy link

@typehorror
Copy link

To retrieve the ip address

docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container_name>

@wsargent
Copy link
Author

@saulshanabrook I do wish that they would stop changing their URLs around without even a redirect...

@wsargent
Copy link
Author

@Debrice udpated, thx.

@geshan
Copy link

geshan commented Jun 28, 2014

how do I assign a static IP to a docker container??

@aronr
Copy link

aronr commented Jul 19, 2014

@geshan One possible way to assign a static IP address to a Docker container, might be via @jpetazzo's pipework shell script.

See the example given by Lukas Pustina, under the subhead "Pipework – More Networks for your Containers" in Docker Networking Made Simple or 3 Ways to Connect LXC Containers.

@psav
Copy link

psav commented Jul 24, 2014

Thanks for this! very helpful indeed!

@noelyahan
Copy link

Awesome thanks a lot !

@tatjana-predojev
Copy link

Thank you this is super useful!

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