Docker Cheatsheet

Pull Image docker pull ubuntu:14.04

Run Container (bash) docker run -i -t IMAGE /bin/bash

Delete Container docker rm ID

Delete Image docker rmi ID

Commit Container to Image docker commit CONTAINER IMAGE

Mount Host Folder in Container docker run -i -t -v /host/directory/path:/mnt IMAGE /bin/bash

Save & Compress Docker Image to File (LZMA) docker save IMAGE | xz --format=lzma > NAME.lzma

Load Compressed Docker Image (LZMA) xz -F lzma -d -k -c NAME.lzma | docker load

Comments