O'Reilly logo

Docker and Kubernetes for Java Developers by Jaroslaw Krochmalski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Volume-related commands

The basis of volume-related commands is docker volume. The commands are as follows:

  • $docker volume create: Creates a volume
  • $ docker volume inspect: Displays detailed information on one or more volumes
  • $docker volume ls: Lists volumes
  • $ docker volume rm: removes one or more volumes
  • $ docker volume prune: removes all unused volumes, which is all volumes that are no longer mapped into any container

Similar to network-related commands, you can get the detailed description and all the possible options for each command if you execute it with the -help switch, for example: docker volume create -help. Let's begin with creating a volume.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required