spiegel_podman/pkg/specgen/generate
Matthew Heon 7ac3d906b5 Rework port parsing to support --expose and -P
As part of this, make a major change to the type we use to
represent port mappings in SpecGen (from using existing OCICNI
structs to using our own custom one). This struct has the
advantage of supporting ranges, massively reducing traffic over
the wire for Podman commands using them (for example, the
`podman run -p 5000-6000` command will now send only one struct
instead of 1000). This struct also allows us to easily validate
which ports are in use, and which are not, which is necessary for
--expose.

Once we have parsed the ports from the new struct, we can produce
an accurate map including all currently requested ports, and use
that to determine what ports need to be exposed (some requested
exposed ports may already be included in a mapping from --publish
and will be ignored) and what open ports on the host we can map
them to.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-05-04 20:57:27 -04:00
..
config_linux.go podman v2 remove bloat v2 2020-04-16 12:04:46 -05:00
config_linux_cgo.go podman: add support for --rootfs 2020-04-24 12:56:20 +02:00
config_linux_nocgo.go v2specgen prune libpod 2020-04-14 20:02:20 -05:00
container.go Merge pull request #6024 from baude/v2checkmediatypew 2020-04-28 19:21:50 +02:00
container_create.go Rework port parsing to support --expose and -P 2020-05-04 20:57:27 -04:00
namespaces.go Rework port parsing to support --expose and -P 2020-05-04 20:57:27 -04:00
oci.go Properly handle default capabilities listed in containers.conf 2020-05-01 15:00:26 -04:00
pod_create.go Rework port parsing to support --expose and -P 2020-05-04 20:57:27 -04:00
ports.go Rework port parsing to support --expose and -P 2020-05-04 20:57:27 -04:00
security.go Properly handle default capabilities listed in containers.conf 2020-05-01 15:00:26 -04:00
storage.go Add support for volumes-from, image volumes, init 2020-04-27 13:13:21 -04:00