Show docker versiondocker --version docker version docker info Helpdocker --help docker container --help Show running containersdocker ps docker container ls Show all containers ( includes failed runs )docker container ls -a Search an image (alpine)docker search alpine Show available versions for aplinecurl 'https://registry.hub.docker.com/v2/repositories/library/alpine/tags/'|jq '."results"[]["name"]' Download an imagedocker pull alpine:3.8 List the imagesdocker image ls Create an image from a base vim myImageFROM alpine:3.8 COPY . /app CMD /app/hello.sh Build an imagedocker build -t NAME:TAG -f DOCKERFILE . View the layersdocker history IMAGE_ID Run an imagedocker run -dit --name NAME:TAG --restart no|on-failure|unless-stopped|always d Run container in background and print container ID i Keep STDIN open even if not attached t Allocate a pseudo-TTY Run an image and map a portdocker run -d -p 8080:80 NAME:TAG Attach to a runing imagedocker attach CONTAINER_ID Stop an imagedocker container stop CONTAINER_ID docker container kill CONTAINER_ID Remove a containerdocker image rm IMAGE_ID Get all containers id on this machinedocker image ls -a -q