Docker tips
For my tips about docker compose, go here.
Create an image
docker build -t <name> .
Save and import
docker save <image> > file docker load < <image>
Run
docker run --name …
For my tips about docker compose, go here.
docker build -t <name> .
docker save <image> > file docker load < <image>
docker run --name …
If you are running docker 1.3 or above, you should use: docker exec -it CONTAINER COMMAND to run COMMAND within the container. You can easily create a function to ease the thing and run bash by default:
dk-enter() { docker exec -it "$1" "${2:-/bin/bash}" }
Otherwise, you can easily …