Labs ICT
Pro Login

Pulling and Managing Images

Using docker pull, images, and rmi commands

Getting Images

Before running a container, you need an image. Docker pulls images from registries automatically, or you can manage them manually.

Essential Commands


  Pull an image:
  $ docker pull nginx
  $ docker pull nginx:1.25        (specific version)
  $ docker pull ubuntu:22.04      (specific tag)

  List local images:
  $ docker images
  REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
  nginx        latest    a8758716bb6a   2 weeks ago    187MB
  ubuntu       22.04     1e9b471c7e8b   3 weeks ago    77.8MB

  Remove an image:
  $ docker rmi nginx
  $ docker rmi a8758716bb6a        (by ID)
  $ docker image prune             (remove unused images)

Image Tags