aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgenutil/specgen.go
diff options
context:
space:
mode:
authorMikhail Khachayants <tyler92@inbox.ru>2022-08-27 20:38:21 +0300
committerMikhail Khachayants <tyler92@inbox.ru>2022-08-27 21:46:10 +0300
commitb4f5a246a24569cc72b109c3477e867e503d14cb (patch)
tree1f79b9d3c9100a1bfe380ac5a923e2ed08f3ef0f /pkg/specgenutil/specgen.go
parentd68eea60148e9fa4e24697104caa691b7e783380 (diff)
downloadpodman-b4f5a246a24569cc72b109c3477e867e503d14cb.tar.gz
podman-b4f5a246a24569cc72b109c3477e867e503d14cb.tar.bz2
podman-b4f5a246a24569cc72b109c3477e867e503d14cb.zip
remove github.com/docker/libnetwork dependency
Code from this dependency was replaced with a simple version. As a result Podman's memory consumption has been reduced by ~10%. [NO NEW TESTS NEEDED] Signed-off-by: Mikhail Khachayants <tyler92@inbox.ru>
Diffstat (limited to 'pkg/specgenutil/specgen.go')
-rw-r--r--pkg/specgenutil/specgen.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go
index 8c2c59fed..d0e09fe72 100644
--- a/pkg/specgenutil/specgen.go
+++ b/pkg/specgenutil/specgen.go
@@ -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"
)
@@ -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
}