Last active
October 29, 2018 20:27
-
-
Save jdwolk/edd8207407720e5d6269ce1a420ca430 to your computer and use it in GitHub Desktop.
Docker tips and tricks
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
docker ps -a | |
Show all docker containers, even runs not running | |
docker build -f <DOCKERFILE> -t <????NOT REALLY THE NAME???> <DIR> | |
builds whatever's in <DIR> using the <DOCKERFILE> to the <???NOT REALLY THE NAME???> | |
docker run <NAME> | |
Runs the container named <NAME>. Pulls down the required image first if it doesn't exist | |
docker run -d -t -p <IP>:<PORT>:<MAPPED-PORT> --name <NAME> <???NOT REALLY THE NAME???>k | |
Run a container w/ mapped ports | |
docker kill <NAME> | |
kills container named <NAME> | |
docker rm <NAME> | |
removes container named <NAME> | |
docker exec -it <NAME> <CMD> | |
executes <CMD> in the container named <NAME> | |
docker-machine ls | |
Shows VMs that can run docker containers(?) | |
docker-machine ip default | |
Get the ip of the "default" VM where docker containers run | |
--------- | |
docker-machine ip default | |
docker build -f fox/Dockerfile-DEV -t "foxdockerimages" . | |
docker run -d -t -p 192.168.99.100:443:443 -p 192.168.99.100:38655:80 --name fox foxdockerimages | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment