aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_create.go8
-rw-r--r--pkg/domain/infra/abi/play.go4
2 files changed, 5 insertions, 7 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 4ad6aa862..cbcda474a 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -159,10 +159,10 @@ func makeCreateConfig(ctx context.Context, containerConfig *config.Config, input
User: input.User,
}
pidConfig := createconfig.PidConfig{PidMode: namespaces.PidMode(input.HostConfig.PidMode)}
- volumes := make([]string, 0, len(input.Volumes))
- for k := range input.Volumes {
- volumes = append(volumes, k)
- }
+ // TODO: We should check that these binds are all listed in the `Volumes`
+ // key since it doesn't make sense to define a `Binds` element for a
+ // container path which isn't defined as a volume
+ volumes := input.HostConfig.Binds
// Docker is more flexible about its input where podman throws
// away incorrectly formatted variables so we cannot reuse the
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 888811958..52a62a25d 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -340,9 +340,7 @@ func getPodPorts(containers []v1.Container) []ocicni.PortMapping {
HostPort: p.HostPort,
ContainerPort: p.ContainerPort,
Protocol: strings.ToLower(string(p.Protocol)),
- }
- if p.HostIP != "" {
- logrus.Debug("HostIP on port bindings is not supported")
+ HostIP: p.HostIP,
}
// only hostPort is utilized in podman context, all container ports
// are accessible inside the shared network namespace