mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Merge pull request #9284 from rhatdan/annotations
Support annotations from containers.conf
This commit is contained in:
@ -53,6 +53,8 @@ tz = "Pacific/Honolulu"
|
||||
|
||||
umask = "0002"
|
||||
|
||||
annotations=["run.oci.keep_original_groups=1",]
|
||||
|
||||
[engine]
|
||||
|
||||
network_cmd_options=["allow_host_loopback=true"]
|
||||
|
||||
@ -320,4 +320,15 @@ var _ = Describe("Podman run", func() {
|
||||
Expect(session.OutputToString()).To(Equal("0022"))
|
||||
})
|
||||
|
||||
It("podman run containers.conf annotations test", func() {
|
||||
//containers.conf is set to "run.oci.keep_original_groups=1"
|
||||
session := podmanTest.Podman([]string{"create", "--rm", "--name", "test", fedoraMinimal})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
inspect := podmanTest.Podman([]string{"inspect", "--format", "{{ .Config.Annotations }}", "test"})
|
||||
inspect.WaitWithDefaultTimeout()
|
||||
Expect(inspect.OutputToString()).To(ContainSubstring("run.oci.keep_original_groups:1"))
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
@ -332,6 +332,9 @@ var _ = Describe("Podman run", func() {
|
||||
It("podman run user capabilities test", func() {
|
||||
// We need to ignore the containers.conf on the test distribution for this test
|
||||
os.Setenv("CONTAINERS_CONF", "/dev/null")
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
}
|
||||
session := podmanTest.Podman([]string{"run", "--rm", "--user", "bin", ALPINE, "grep", "CapBnd", "/proc/self/status"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
@ -424,6 +427,9 @@ var _ = Describe("Podman run", func() {
|
||||
It("podman run user capabilities test with image", func() {
|
||||
// We need to ignore the containers.conf on the test distribution for this test
|
||||
os.Setenv("CONTAINERS_CONF", "/dev/null")
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
}
|
||||
dockerfile := `FROM busybox
|
||||
USER bin`
|
||||
podmanTest.BuildImage(dockerfile, "test", "false")
|
||||
|
||||
Reference in New Issue
Block a user