The Commands

This lesson lists all the relevant Docker volume commands with brief reminders of what each one does.

  • docker volume create creates new volumes. By default, volumes are created with the local driver, but you can use the -d flag to specify a different driver.

  • docker volume ls lists all volumes on the local Docker host.

  • docker volume inspect shows detailed volume information. Use this command to see many interesting volume properties, including where a volume exists in the Docker host’s filesystem.

  • docker volume prune deletes all volumes that are not in use by a container or service replica. Use with caution!

  • docker volume rm deletes specific volumes that are not in use.

  • docker plugin install installs new volume plugins from Docker Hub.

  • docker plugin ls lists all plugins installed on a Docker host.

Get hands-on with 1400+ tech skills courses.