Skip to content

Container volumes

Volumes mount persistent storage into containers on Stack Harbor PaaS. This page covers the four mount types — local filesystem, data container, master container, and external NFS — and how to add, edit, and remove them.

The Volumes tab in the container layer settings lists the data volumes mounted into the container. Each entry is a path inside the container that maps to persistent storage somewhere — local disk, another container, or an external NFS server.

Mounting state into volumes lets the container itself stay disposable. Operations like redeploying the container to a different image tag, restarting it, or replacing it during horizontal scale-out happen without touching the data. The volume’s contents persist for as long as the volume exists.

Mount types

Click Add above the volume list to see the four mount types:

  • Local Filesystem — a directory inside the platform’s local storage layer. The directory persists independently of the container; if you destroy the container and recreate it pointing at the same path, the data is still there.
  • Data Container — mount data from another layer in the same account. Useful when two environments need to share state, or when a build container needs to write into a runtime container’s path.
  • Master Container — data is physically stored on the layer’s first-created node (the “master”) and shared with every other instance in that layer. The standard pattern for horizontally scaled stateless services that still need to read a small amount of shared state.
  • External Server — mount data from an external NFS server, either a third-party storage service or a container on another platform installation.

For each mount type, the configuration prompts the path inside the container, the source location, and read/write permissions. Specific fields depend on the type chosen — see the linked subpages in the dashboard for each.

When the parameters are set, click Add to attach the volume.

Default volumes

The platform automatically creates a set of volumes when the container is provisioned. These defaults are populated from the container’s image manifest and cover the directories the image expects to be persistent. They appear in the Volumes list and can be edited but not deleted.

Editing and removing volumes

The Edit button on a row (or double-clicking the row) lets you change settings for an existing volume:

  • The Local Path inside the container is fixed.
  • The mount source can be changed by switching tabs (local → external NFS, for example).
  • Access permissions can be toggled with the Read Only switch.

Apply changes to commit them.

To unmount a custom volume, select its row and click Remove. Confirm in the pop-up. Notes:

  • Default (predefined) volumes can’t be deleted — only edited.
  • Deleting a volume permanently removes its data — back up first if you need the contents.
  • To remove the volume but keep the mount point in the container’s filesystem, untick Unmount path before confirming.

After any volume change, click Apply at the bottom of the layer settings frame. If you’re inside the Topology Wizard for an existing environment, click Apply there as well to commit the topology change.

See also