docker

docker_cheatsheet

docker commandline for life

1 minute read

List of docker commands to use when building and cleaning up images and containers.

builds image (Dockerfile in current dir) docker build . # build image with specific Dockerfile docker build -f Dockfile_unittest # list docker images docker images # list docker image ids docker images -q # check current running containers docker ps # check all containers (not running too) docker ps -a # only return container ids docker ps -a -q # start a container in an interactive bash session docker run -it IMAGEID bash Nested Commands Nesting commands together allow you to do much more complex actions against mulitple containers or images.