Docker images

  1. Usage: docker images [OPTIONS] [REPOSITORY[:TAG]]
  2. List images
  3. Options:
  4. -a, --all Show all images (default hides intermediate images)
  5. --digests Show digests
  6. -f, --filter filter Filter output based on conditions provided
  7. --format string Pretty-print images using a Go template
  8. --no-trunc Don't truncate output
  9. -q, --quiet Only show numeric IDs

Docker rmi

docker rmi $(docker images -aq) 删除所有镜像 docker rmi -f $(docker images —filter=reference=’hellochen/*’ -q) 删除特定镜像

Docker commit

  1. Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
  2. Create a new image from a container's changes
  3. Options:
  4. -a, --author string Author (e.g., "John Hannibal Smith
  5. <hannibal@a-team.com>")
  6. -c, --change list Apply Dockerfile instruction to the created image
  7. -m, --message string Commit message
  8. -p, --pause Pause container during commit (default true)

eg:docker -a "HelloChen" -m "add zsh" containerID containerName:version