diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-03-15 12:55:06 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-03-15 14:02:04 +0100 |
commit | 57e8c66322849ff60e6126616c0c9883a80fb139 (patch) | |
tree | dc91b324d82675d66c6b1f37d6ca97c82597ae30 /libpod/container.go | |
parent | 762148deb6be6925d17bd12f219f7385e1402439 (diff) | |
download | podman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.gz podman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.bz2 podman-57e8c66322849ff60e6126616c0c9883a80fb139.zip |
Do not leak libpod package into the remote client
Some packages used by the remote client imported the libpod package.
This is not wanted because it adds unnecessary bloat to the client and
also causes problems with platform specific code(linux only), see #9710.
The solution is to move the used functions/variables into extra packages
which do not import libpod.
This change shrinks the remote client size more than 6MB compared to the
current master.
[NO TESTS NEEDED]
I have no idea how to test this properly but with #9710 the cross
compile should fail.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/libpod/container.go b/libpod/container.go index 65abbfd5e..c49d8feeb 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -84,24 +84,6 @@ func (ns LinuxNS) String() string { } } -// Valid restart policy types. -const ( - // RestartPolicyNone indicates that no restart policy has been requested - // by a container. - RestartPolicyNone = "" - // RestartPolicyNo is identical in function to RestartPolicyNone. - RestartPolicyNo = "no" - // RestartPolicyAlways unconditionally restarts the container. - RestartPolicyAlways = "always" - // RestartPolicyOnFailure restarts the container on non-0 exit code, - // with an optional maximum number of retries. - RestartPolicyOnFailure = "on-failure" - // RestartPolicyUnlessStopped unconditionally restarts unless stopped - // by the user. It is identical to Always except with respect to - // handling of system restart, which Podman does not yet support. - RestartPolicyUnlessStopped = "unless-stopped" -) - // Container is a single OCI container. // All operations on a Container that access state must begin with a call to // syncContainer(). |