mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
Merge pull request #5031 from baude/apiv2dockercontainerslash
compat container names begin with /
This commit is contained in:
@ -360,7 +360,7 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData) (*Contai
|
|||||||
|
|
||||||
return &Container{docker.Container{
|
return &Container{docker.Container{
|
||||||
ID: l.ID(),
|
ID: l.ID(),
|
||||||
Names: []string{l.Name()},
|
Names: []string{fmt.Sprintf("/%s", l.Name())},
|
||||||
Image: imageName,
|
Image: imageName,
|
||||||
ImageID: imageId,
|
ImageID: imageId,
|
||||||
Command: strings.Join(l.Command(), " "),
|
Command: strings.Join(l.Command(), " "),
|
||||||
@ -431,7 +431,7 @@ func LibpodToContainerJSON(l *libpod.Container) (*docker.ContainerJSON, error) {
|
|||||||
HostsPath: inspect.HostsPath,
|
HostsPath: inspect.HostsPath,
|
||||||
LogPath: l.LogPath(),
|
LogPath: l.LogPath(),
|
||||||
Node: nil,
|
Node: nil,
|
||||||
Name: l.Name(),
|
Name: fmt.Sprintf("/%s", l.Name()),
|
||||||
RestartCount: 0,
|
RestartCount: 0,
|
||||||
Driver: inspect.Driver,
|
Driver: inspect.Driver,
|
||||||
Platform: "linux",
|
Platform: "linux",
|
||||||
|
Reference in New Issue
Block a user