Skip to content

Commit 113b486

Browse files
Drop /tcp prefix
This might have been required by old docker versions but it breaks podman
1 parent 9a83963 commit 113b486

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/diambra/diambra.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,13 @@ func (d *Diambra) Start() error {
242242

243243
func newEnvContainer(config *EnvConfig, envID, randomSeed int) (*container.Container, error) {
244244
pm := &container.PortMapping{}
245-
hostPort := "0/tcp"
245+
hostPort := "0"
246246
if config.PreallocatePort {
247247
listener, err := net.Listen("tcp", ":0")
248248
if err != nil {
249249
return nil, err
250250
}
251-
hostPort = fmt.Sprintf("%d/tcp", listener.Addr().(*net.TCPAddr).Port)
251+
hostPort = fmt.Sprintf("%d", listener.Addr().(*net.TCPAddr).Port)
252252
}
253253

254254
pm.AddPortMapping(ContainerPort, hostPort, config.Host)

0 commit comments

Comments
 (0)