mirror of
https://github.com/containers/podman.git
synced 2025-05-22 01:27:07 +08:00
libpod: fix lookup for subpath in volumes
a subdirectory that is below a mount destination is detected as a subpath. Closes: https://github.com/containers/podman/issues/15789 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -46,6 +46,15 @@ var _ = Describe("Podman run", func() {
|
||||
Expect(session).Should(Exit(126))
|
||||
})
|
||||
|
||||
It("podman run a container using a --workdir under a bind mount", func() {
|
||||
volume, err := CreateTempDirInTempDir()
|
||||
Expect(err).To(BeNil())
|
||||
|
||||
session := podmanTest.Podman([]string{"run", "--volume", fmt.Sprintf("%s:/var_ovl/:O", volume), "--workdir", "/var_ovl/log", ALPINE, "true"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
})
|
||||
|
||||
It("podman run a container on an image with a workdir", func() {
|
||||
dockerfile := fmt.Sprintf(`FROM %s
|
||||
RUN mkdir -p /home/foobar /etc/foobar; chown bin:bin /etc/foobar
|
||||
|
Reference in New Issue
Block a user