Last active
April 17, 2019 16:36
-
-
Save marc-barry/5c3f725ad0f6dcd8b2094aad3d7dbada to your computer and use it in GitHub Desktop.
Marc's list of useful Docker stuff
This file contains 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
# Run interactive TTY | |
$ docker run -it <image> /bin/sh | |
$ docker run -it <image> --entrypoint /bin/sh | |
# Publish a container’s port(s) to the host | |
$ docker run -p 127.0.0.1:80:80/tcp -it <image> | |
# Publish all exposed ports to random ports | |
$ docker run -P -it <image> | |
# Run a command in a running container | |
$ docker exec -it <container id> /bin/ash | |
# Stop all running containers | |
$ docker stop $(docker ps -a -q) | |
# Remove all containers | |
$ docker rm $(docker ps -a -q) | |
# Remove unused data | |
$ docker system prune | |
# Remove all unused images not just dangling ones | |
$ docker system prune -a | |
# Get tag list from the registry | |
$ curl https://docker.internal.digitalocean.com/v2/growth_onboarding/openchannel_proxy/tags/list | |
# Cleaning up a private registry | |
https://github.com/fraunhoferfokus/deckschrubber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker network ls
docker network inspect <network_id>