Skip to content

Commit

Permalink
Merge branch 'containers:main' into api_compat_containers
Browse files Browse the repository at this point in the history
  • Loading branch information
jertel authored Aug 30, 2022
2 parents 0e53c8c + 57441b4 commit 368fa60
Show file tree
Hide file tree
Showing 26 changed files with 49 additions and 1,374 deletions.
15 changes: 15 additions & 0 deletions docs/source/markdown/options/http-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#### **--http-proxy**

By default proxy environment variables are passed into the container if set
for the Podman process. This can be disabled by setting the value to **false**.
The environment variables passed in include **http_proxy**,
**https_proxy**, **ftp_proxy**, **no_proxy**, and also the upper case versions of
those. This option is only needed when the host system must use a proxy but
the container should not use any proxy. Proxy environment variables specified
for the container in any other way will override the values that would have
been passed through from the host. (Other ways to specify the proxy for the
container include passing the values with the **--env** flag, or hard coding the
proxy environment at container build time.)
(This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

Defaults to **true**.
5 changes: 5 additions & 0 deletions docs/source/markdown/options/subgidname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### **--subgidname**=*name*

Run the container in a new user namespace using the map with _name_ in the _/etc/subgid_ file.
If running rootless, the user needs to have the right to use the mapping. See **subgid**(5).
This flag conflicts with **--userns** and **--gidmap**.
5 changes: 5 additions & 0 deletions docs/source/markdown/options/subuidname.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### **--subuidname**=*name*

Run the container in a new user namespace using the map with _name_ in the _/etc/subuid_ file.
If running rootless, the user needs to have the right to use the mapping. See **subuid**(5).
This flag conflicts with **--userns** and **--uidmap**.
28 changes: 3 additions & 25 deletions docs/source/markdown/podman-create.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -230,25 +230,7 @@ Print usage statement

@@option hostuser

#### **--http-proxy**

By default proxy environment variables are passed into the container if set
for the Podman process. This can be disabled by setting the `--http-proxy`
option to `false`. The environment variables passed in include `http_proxy`,
`https_proxy`, `ftp_proxy`, `no_proxy`, and also the upper case versions of
those. This option is only needed when the host system must use a proxy but
the container should not use any proxy. Proxy environment variables specified
for the container in any other way will override the values that would have
been passed through from the host. (Other ways to specify the proxy for the
container include passing the values with the `--env` flag, or hard coding the
proxy environment at container build time.) (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

For example, to disable passing these environment variables from host to
container:

`--http-proxy=false`

Defaults to `true`
@@option http-proxy

@@option image-volume

Expand Down Expand Up @@ -604,13 +586,9 @@ When size is `0`, there is no limit on the amount of memory used for IPC by the

@@option stop-timeout

#### **--subgidname**=*name*

Name for GID map from the `/etc/subgid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--gidmap`.

#### **--subuidname**=*name*
@@option subgidname

Name for UID map from the `/etc/subuid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--uidmap`.
@@option subuidname

#### **--sysctl**=*SYSCTL*

Expand Down
8 changes: 2 additions & 6 deletions docs/source/markdown/podman-pod-clone.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,9 @@ When size is `0`, there is no limit on the amount of memory used for IPC by the
When set to true, this flag starts the newly created pod after the
clone process has completed. All containers within the pod are started.

#### **--subgidname**=*name*
@@option subgidname

Name for GID map from the `/etc/subgid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--gidmap`.

#### **--subuidname**=*name*

Name for UID map from the `/etc/subuid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--uidmap`.
@@option subuidname

#### **--sysctl**=*name=value*

Expand Down
9 changes: 2 additions & 7 deletions docs/source/markdown/podman-pod-create.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,9 @@ Size of `/dev/shm` (format: `<number>[<unit>]`, where unit = b (bytes), k (kibib
If the unit is omitted, the system uses bytes. If the size is omitted, the system uses `64m`.
When size is `0`, there is no limit on the amount of memory used for IPC by the pod. This option conflicts with **--ipc=host** when running containers.

#### **--subgidname**=*name*

Name for GID map from the `/etc/subgid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--gidmap`.

#### **--subuidname**=*name*

Name for UID map from the `/etc/subuid` file. Using this flag will run the container with user namespace enabled. This flag conflicts with `--userns` and `--uidmap`.
@@option subgidname

@@option subuidname

#### **--sysctl**=*name=value*

Expand Down
27 changes: 3 additions & 24 deletions docs/source/markdown/podman-run.1.md.in
Original file line number Diff line number Diff line change
Expand Up @@ -264,20 +264,7 @@ Print usage statement

@@option hostuser

#### **--http-proxy**

By default proxy environment variables are passed into the container if set
for the Podman process. This can be disabled by setting the value to **false**.
The environment variables passed in include **http_proxy**,
**https_proxy**, **ftp_proxy**, **no_proxy**, and also the upper case versions of
those. This option is only needed when the host system must use a proxy but
the container should not use any proxy. Proxy environment variables specified
for the container in any other way will override the values that would have
been passed through from the host. (Other ways to specify the proxy for the
container include passing the values with the **--env** flag, or hard coding the
proxy environment at container build time.) (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)

Defaults to **true**.
@@option http-proxy

@@option image-volume

Expand Down Expand Up @@ -641,17 +628,9 @@ Sets whether the signals sent to the **podman run** command are proxied to the c

@@option stop-timeout

#### **--subgidname**=*name*

Run the container in a new user namespace using the map with _name_ in the _/etc/subgid_ file.
If calling **podman run** as an unprivileged user, the user needs to have the right to use the mapping. See **subgid**(5).
This flag conflicts with **--userns** and **--gidmap**.

#### **--subuidname**=*name*
@@option subgidname

Run the container in a new user namespace using the map with _name_ in the _/etc/subuid_ file.
If calling **podman run** as an unprivileged user, the user needs to have the right to use the mapping. See **subuid**(5).
This flag conflicts with **--userns** and **--uidmap**.
@@option subuidname

#### **--sysctl**=*name=value*

Expand Down
2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,4 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

require github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316 // indirect

replace github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.1-0.20220617142545-8b9452f75cbc
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651 h1:YcvzL
github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651/go.mod h1:LFyLie6XcDbyKGeVK6bHe+9aJTYCxWLBg5IrJZOaXKA=
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316 h1:moehPjPiGUaWdwgOl92xRyFHJyaqXDHcCyW9M6nmCK4=
github.com/docker/libnetwork v0.8.0-dev.2.0.20190625141545-5a177b73e316/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8=
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4=
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE=
Expand Down
8 changes: 4 additions & 4 deletions pkg/specgenutil/specgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"github.com/containers/podman/v4/pkg/specgen"
systemdDefine "github.com/containers/podman/v4/pkg/systemd/define"
"github.com/containers/podman/v4/pkg/util"
"github.com/docker/docker/opts"
"github.com/docker/go-units"
"github.com/opencontainers/runtime-spec/specs-go"
)
Expand Down Expand Up @@ -461,11 +460,12 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions

// SHM Size
if c.ShmSize != "" {
var m opts.MemBytes
if err := m.Set(c.ShmSize); err != nil {
val, err := units.RAMInBytes(c.ShmSize)

if err != nil {
return fmt.Errorf("unable to translate --shm-size: %w", err)
}
val := m.Value()

s.ShmSize = &val
}

Expand Down
5 changes: 5 additions & 0 deletions test/e2e/generate_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ var _ = Describe("Podman generate kube", func() {

It("podman generate kube on pod with ports", func() {
podName := "test"

lock4 := GetPortLock("4000")
defer lock4.Unlock()
lock5 := GetPortLock("5000")
defer lock5.Unlock()
podSession := podmanTest.Podman([]string{"pod", "create", "--name", podName, "-p", "4000:4000", "-p", "5000:5000"})
podSession.WaitWithDefaultTimeout()
Expect(podSession).Should(Exit(0))
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/play_kube_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2482,7 +2482,7 @@ spec:

It("podman play kube test with network portbindings", func() {
ip := "127.0.0.100"
port := "5000"
port := "8087"
ctr := getCtr(withHostIP(ip, port), withImage(BB))

pod := getPod(withCtr(ctr))
Expand All @@ -2496,7 +2496,7 @@ spec:
inspect := podmanTest.Podman([]string{"port", getCtrNameInPod(pod)})
inspect.WaitWithDefaultTimeout()
Expect(inspect).Should(Exit(0))
Expect(inspect.OutputToString()).To(Equal("5000/tcp -> 127.0.0.100:5000"))
Expect(inspect.OutputToString()).To(Equal("8087/tcp -> 127.0.0.100:8087"))
})

It("podman play kube test with nonexistent empty HostPath type volume", func() {
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/save_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ var _ = Describe("Podman save", func() {
defer os.Setenv("GNUPGHOME", origGNUPGHOME)

port := 5000
portlock := GetPortLock(strconv.Itoa(port))
defer portlock.Unlock()

session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", strings.Join([]string{strconv.Itoa(port), strconv.Itoa(port)}, ":"), REGISTRY_IMAGE})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expand Down
84 changes: 0 additions & 84 deletions vendor/github.com/docker/docker/opts/address_pools.go

This file was deleted.

30 changes: 0 additions & 30 deletions vendor/github.com/docker/docker/opts/env.go

This file was deleted.

Loading

0 comments on commit 368fa60

Please sign in to comment.