Last active
December 18, 2015 04:29
-
-
Save JamesPrudente/5725349 to your computer and use it in GitHub Desktop.
docker commands
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
create docker file in local directory with tag | |
docker build -t zero:v1 . | |
start detached container (Dockerfile specified cmd to run) | |
docker run -d -b /zero:/zero zero:v1 | |
bind mount and start shell | |
docker run -b /hostdir:/clientdir dev:v1 /bin/bash | |
inspect most recent container | |
docker inspect `docker ps -q -l` | |
show ip address for most recent container | |
docker inspect `docker ps -q -l`| python -c "import json, sys; print json.loads(''.join( sys.stdin.readlines() ))['NetworkSettings']['IPAddress']" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment