From d0c89e90bf2ebb7915ccfa60c14717a031e6eadf Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 4 Jan 2023 11:44:07 -0500 Subject: [PATCH] Describe copy volume options Fixes: https://github.com/containers/podman/issues/16961 Signed-off-by: Daniel J Walsh --- docs/source/markdown/options/volume.md | 6 ++++++ pkg/domain/infra/abi/containers.go | 2 +- test/e2e/run_transient_test.go | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/source/markdown/options/volume.md b/docs/source/markdown/options/volume.md index 786a578427..8af133653f 100644 --- a/docs/source/markdown/options/volume.md +++ b/docs/source/markdown/options/volume.md @@ -156,6 +156,12 @@ To recursively mount a volume and all of its submounts into a used, and submounts of the source directory will not be mounted into the <>. +Mounting the volume with a **copy** option tells podman to copy content from +the underlying destination directory onto newly created internal volumes. The +**copy** only happens on the initial creation of the volume. Content is not +copied up when the volume is subsequently used on different containers. The +**copy** option is ignored on bind mounts and has no effect. + Mounting the volume with the **nosuid** options means that SUID applications on the volume will not be able to change their privilege. By default volumes are mounted with **nosuid**. diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index 3d81a7d8f5..b058489241 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -424,7 +424,7 @@ func (ic *ContainerEngine) ContainerRm(ctx context.Context, namesOrIds []string, } } - // First, remove dependend containers. + // First, remove dependent containers. if options.All || options.Depend { for _, ctr := range libpodContainers { // When `All` is set, remove the infra containers and diff --git a/test/e2e/run_transient_test.go b/test/e2e/run_transient_test.go index febd6304cf..34166dcc20 100644 --- a/test/e2e/run_transient_test.go +++ b/test/e2e/run_transient_test.go @@ -49,7 +49,7 @@ var _ = Describe("Podman run with volumes", func() { _ = SystemExec("ls", []string{"-l", containerStorageDir}) - // All files should be in permament store, not volatile + // All files should be in permanent store, not volatile Expect(filepath.Join(containerStorageDir, "containers.json")).Should(BeARegularFile()) Expect(filepath.Join(containerStorageDir, "volatile-containers.json")).Should(Not(BeAnExistingFile())) Expect(filepath.Join(runContainerStorageDir, "containers.json")).Should(Not(BeAnExistingFile())) @@ -63,7 +63,7 @@ var _ = Describe("Podman run with volumes", func() { session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) - // All files should be in permament store, volatile + // All files should not be in permanent store, not volatile Expect(filepath.Join(containerStorageDir, "containers.json")).Should(Not(BeAnExistingFile())) Expect(filepath.Join(containerStorageDir, "volatile-containers.json")).Should(BeARegularFile()) Expect(filepath.Join(runContainerStorageDir, "containers.json")).Should(Not(BeAnExistingFile()))