Skip to main content

Volumes

Overview

The Docker Volumes Card empowers you to effectively manage volumes associated with your Docker applications running on Barbara Edge Nodes.

This intuitive interface provides a centralized location to:

  • View: Gain a clear overview of all Docker volumes currently in use on your edge nodes.
  • Inspect: Dive deeper into individual volumes to view details like size, usage, and mounted directories.
  • Manage: Perform essential management tasks, including creating, deleting, and pruning unused volumes to optimize storage utilization on your edge devices.

This article will guide you through leveraging the Docker Volumes Card to streamline your workflow and ensure optimal storage management for your Dockerized applications at the edge.

Types of Docker Volumes

Docker volumes are a way to persist data generated by and used by Docker containers. They are similar to bind mounts, but they are managed by Docker and are isolated from the core functionality of the host machine. A given volume can be mounted into multiple containers simultaneously.

There are two types of Docker volumes:

  • Internal volumes: Internal volumes are created and managed by Docker. They are stored on the Docker host and are not accessible outside of the container. Internal volumes are typically used for data that is only needed by the container, such as logs or configuration files.
  • External volumes: External volumes are created and managed by the user. They can be stored on the Docker host or on a remote host. External volumes are typically used for data that needs to be shared between containers or that needs to be persisted after the container is stopped.

The following table summarizes the key differences between internal and external volumes:

FeatureInternal VolumesExternal Volumes
Created byDockerUser
LocationDocker hostDocker or remote host
Accessible outside of the containerNoYes
Typically used forData that is only needed by the containerData that needs to be shared between containers or persisted after the container is stopped

Volume Types and Application Behavior

The behavior of your Docker application using volumes in its docker-compose file depends on the type of volume employed:

  • Internal Volumes:

    • Volume Creation: If the application defines an internal volume and it doesn't exist, Docker automatically creates the volume before starting the application.
    • Existing Volume: If the internal volume already exists, Docker connects the service to the existing volume, utilizing the data currently stored within it.
    • Persistence: Internal volumes are persistent, meaning they are not deleted when the application is stopped.
  • External Volume:

    • Missing Volume: If the application tries to use an external volume that doesn't exist, the application will fail to start, typically resulting in a crash.

Docker Volumes Card UI

Card Index

Docker Volumes Card

Docker Volumes Card

  1. Collapse/Expand card.
  2. Hide card.
  3. Add a new volume.
  4. Prune all volumes.
  5. Volume Status: indicates whether the volume is in use or not.
  6. Volume Size.
  7. Delete a volume.
  8. Expand volume details.

Volume Details

If you expand any volume, you will see more information related to that volume:

Volume Details

Volume Details

  1. Containers using that volume.
  2. Target for every container.
  3. More Info tooltip.

If you hover your mouse over the "More Info" icon, a tooltip will be shown with more information about the volume, indicating:

  • Container that is using the volume.
  • App that launches this container.
  • Service involved.
  • Target path of the folder used.

Volume More Info

Volume More Info

Reveal the Docker Volumes Card

Proceed to the top right hand corner in the Node Details's view. Click on the “Add Card” button.

Volume Details

Volume Details

Scroll down and select the “Dockers Volumes” Card.

Selecting Docker Volumes Card

Selecting Docker Volumes Card

Your Dockers Volumes Card will now appear in the Barbara Panel alongside your other Cards.

tip

If you can’t select your Docker Volumes Card from the drop down menu this is because your card is already in your Node Details view.

Create an External Docker Volume manually

Select the “+” button to add a Docker Volume.

Press the + button

Press the + button

Follow the prompt to name your Volume and click “Send” to save your changes.

Docker Volumes add modal

Docker Volumes add modal

The new volume will appear now in your Docker Volumes card.

tip

The Docker Volumes Card automatically displays all internal volumes currently in use on your edge node.

Prune a Single Docker Volume

You can delete an individual Volume within your Card by selecting the “Delete” icon on the Volume tab you wish to delete.

Prune a single volume

Prune a single volume

tip

You can only delete a Volume in your “Docker Volumes” Card when it is not in use.

Prune All Docker Volumes

To prune all of your Volumes, select the “Delete All” button to the top, right of your Card. Again, you will only be able to delete those Docker Volumes that are not being used.

Prune all volumes

Prune all volumes

You will see a confirmation modal, press "OK" to confirm the operation.

Prune all volumes modal

Prune all volumes modal

Hide your Docker Volumes Card

You can easily hide your Docker Volumes Card, if you want to tidy-up your Panel, without losing any data. Select the “Hide” icon at the top, right of the Volumes Card.

Hide Docker Volumes Card

Hide Docker Volumes Card

Confirm your choice to hide your Card with the follow-up prompt.

Hide Docker Volumes Card Modal

Hide Docker Volumes Card Modal

To easily retrieve your Docker Volumes Card and view it in your Panel go to the "Add Card" button and select "Docker Volumes" from the drop down menu as mentioned in the section Reveal the Docker Volumes Card.