Jim Cheung

Docker

Commands

basic:

clean up containers:

docker ps -a -q | xargs -n 1 -I {} docker rm {}

clean up images:

docker rmi $( docker images | grep '<none>' | tr -s ' ' | cut -d ' ' -f 3)

from 1.3:

docker exec [container] [command]

from 1.4:

docker cp [container]:[path] [local-path]

Dockerfiles

always use dockerfile to build images, the build cache is very useful and super easy to make changes.

No Supervisord

each service should be in a standalone container, single responsibility principle.

Tips