Skip to content

Docker cheat sheet

Category Task Command
Build Build an image docker build --platform linux/x86_64 -t $NAME:latest .
Images List images docker image ls
Operate Run the image as a service docker run -p 9000:8080 $NAME:latest
Find running containers docker container ls
Log onto running continer docker exec -it $CONTAINER_ID sh

Test it (if it is a Lambda service)

curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{}'