By Lukas Aichbauer & Ivan Popovic | March 14, 2024 | 3 min watch


Learn all the commands needed to create your first Docker Image in 162 seconds.
docker build . – build an image out of a Dockerfile located in the current Docker build context . and stores it in the local registry
--file <path-to-dockerfile> – add this flag to the docker build command when your Dockerfile is not located in the current Docker build context or named differently than Dockerfile (e.g., Dockerfile.server)
--tag <user-name>/<repository-name>:<version> – add this flag to the docker build command when you want to give your image a unique name (e.g., examplename/examplerepository:0.1.0)
docker image ls – list all images in your local registry
docker image rm <image-name/image-id> – delete an image from your local registry