J O S E P H J O S E P H

Docker Images

Images

Build image from a Dockerfile.

docker build .

# Options
-t, --tag      # Build the image with a tag
--no-cache     # Build the image without using a cache
--build-arg    # Build the image with a build argument

List local images.

docker images

Remove images.

docker rm <image_name>   # Remove a single image
docker image prune       # Remove all unused images

Pull an image from Docker Hub.

docker pull <repository>:<tag>  # Docker engine will pull the latest version if tag is omitted