diff --git a/pkg/container/client.go b/pkg/container/client.go index ba065ed..9bfb9ab 100644 --- a/pkg/container/client.go +++ b/pkg/container/client.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "io/ioutil" + "os" "strings" "time" @@ -266,6 +267,15 @@ func (client dockerClient) StartContainer(c t.Container) (t.ContainerID, error) name := c.Name() + // detect podman + // podman makes /run/.containerenv, docker makes /run/.dockerenv + _, err := os.Stat("/run/.containerenv") + if err == nil { + // podman workaround + name = name[1:] + hostConfig.Ulimits = nil + } + log.Infof("Creating %s", name) createdContainer, err := client.api.ContainerCreate(bg, config, hostConfig, simpleNetworkConfig, nil, name)