From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Unlock the full course today
Join today to access over 23,300 courses taught by industry experts.
Attach persistent storage to a container
From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security
Attach persistent storage to a container
- [Instructor] Although it is possible to copy data into a container image and make it persistent, this also makes the container larger. Another alternative is to create a Podman volume and attach it to the container. These volumes will persist even across container deletions. Volumes can be used to share data among multiple containers, and since a volume is just a folder on the host machine, it makes it easy to share data with the host as well. And as such, makes it easier to back up data or migrate to another host. To attach a volume to a container, we have to create it with Podman first. Type into a terminal podman volume create hostvol. I named it hostvol to remind me that it's a volume I created on the host. Now inspect it using Podman. Type in podman volume inspect hostvol, and hit enter. This will show the volume's name which we defined, and the mountpoint in .local/share/container/storage/volumes. Copy the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
(Locked)
About containers on Enterprise Linux7m 2s
-
(Locked)
Retrieve container images from a remote registry6m
-
(Locked)
Inspect container images1m 46s
-
(Locked)
Managing containers3m 53s
-
(Locked)
Working with container images9m 39s
-
(Locked)
Build a container from a container file7m 6s
-
(Locked)
Configure a container to start automatically as a systemd service6m 55s
-
(Locked)
Attach persistent storage to a container4m 9s
-
(Locked)
-