Skip to content

Instantly share code, notes, and snippets.

@JamesPrudente
Last active December 18, 2015 04:29
Show Gist options
  • Save JamesPrudente/5725349 to your computer and use it in GitHub Desktop.
Save JamesPrudente/5725349 to your computer and use it in GitHub Desktop.
docker commands
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