liveBook · Manning

Chapter 3: Volumes

What you will learn in chapter 3 of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more

This introduction explains why applications use volumes to keep data outside container images, clarifies what bind mounts do, and previews the security considerations and volume features covered in the chapter.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction explains why applications use volumes to keep data outside container images, clarifies what bind mounts do, and previews the security considerations and volume features covered in the chapter.

Key terms: container image, volumes, overlay, fuse-overlayfs, bind mounts, file hierarchy, user namespace, SELinux, container images

3.1 Using volumes with containers

This section shows how to serve host-provided web content from a container with a bind mount, then explains mount permissions and cleanup.

Key terms: podman exec, volumes, container filesystem, podman run, --volume, -v, HOST-DIR:CONTAINER-DIR, bind mount, :ro, :z

3.1.1 Named volumes

This section shows how to create, use, retain, remove, and transfer Podman named volumes.

Key terms: named volume, podman volume create, podman volume inspect, mount point, local-named volumes, podman run, podman volume rm, --force, podman volume ls, volume plugins

3.1.2 Volume mount options

This section explains how Podman volume options handle ownership and SELinux access, and when a different mounting option is needed.

Key terms: :U, user namespace, UID mapping, chown, podman unshare, :z, SELinux, relabel, --security-opt label=disable, SELinux enforcement

3.1.3 podman run - -mount command option

This subsection explains how Podman’s --mount option exposes Linux mount options and why mounts keep writable data outside container images.

Key terms: podman run --mount, Linux mount command, bind, volume, image, tmpfs, volumes, mounts, container image, read-only

3.2 Summary

The chapter summary explains that volumes separate container data from image applications by mounting filesystem content, and that access may require security adjustments.

Where this is used later

Concepts explained in this chapter

← Chapter 2: Command line Chapter 4: Pods →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.