Last active
October 22, 2019 09:52
-
-
Save pizycki/4ecfc289cb8efc2c12e13103b35b5b60 to your computer and use it in GitHub Desktop.
Docker helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Docker ### | |
| function Docker-PurgeImages { | |
| docker rmi $(docker images -q) | |
| } | |
| function Docker-PurgeContainers { | |
| docker rm $(docker ps -a -q) | |
| } | |
| function Docker-Purge { | |
| Docker-PurgeImages | |
| Docker-PurgeContainers | |
| } | |
| function Get-ContainerIP ([string] $container) { | |
| docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment