summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-30 14:30:37 -0800
committerGitHub <noreply@github.com>2020-01-30 14:30:37 -0800
commitef965bc28d3bfbaef68c30459e6cfad0a35ff84e (patch)
tree1ede60cf0d2331dd762bc9b9c30ce09271b5d44f
parentee0b328b7265a017e310e1a9cd83418cf61aa491 (diff)
parent616acf181d5df87f685b00fa5d03ab7d4e266abc (diff)
downloadpodman-ef965bc28d3bfbaef68c30459e6cfad0a35ff84e.tar.gz
podman-ef965bc28d3bfbaef68c30459e6cfad0a35ff84e.tar.bz2
podman-ef965bc28d3bfbaef68c30459e6cfad0a35ff84e.zip
Merge pull request #5031 from baude/apiv2dockercontainerslash
compat container names begin with /
-rw-r--r--pkg/api/handlers/types.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go
index 33cf1e95d..9c8562744 100644
--- a/pkg/api/handlers/types.go
+++ b/pkg/api/handlers/types.go
@@ -360,7 +360,7 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData) (*Contai
return &Container{docker.Container{
ID: l.ID(),
- Names: []string{l.Name()},
+ Names: []string{fmt.Sprintf("/%s", l.Name())},
Image: imageName,
ImageID: imageId,
Command: strings.Join(l.Command(), " "),
@@ -431,7 +431,7 @@ func LibpodToContainerJSON(l *libpod.Container) (*docker.ContainerJSON, error) {
HostsPath: inspect.HostsPath,
LogPath: l.LogPath(),
Node: nil,
- Name: l.Name(),
+ Name: fmt.Sprintf("/%s", l.Name()),
RestartCount: 0,
Driver: inspect.Driver,
Platform: "linux",