mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
[WIP] Docker compat API fixes
These are the first fixes that are needed for development environments like Eclipse or IntelliJ that have Docker plug-ins and use the Docker API to speak with container engine (#7857) Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
This commit is contained in:
@ -321,8 +321,8 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
|
|||||||
cb := types.ContainerJSONBase{
|
cb := types.ContainerJSONBase{
|
||||||
ID: l.ID(),
|
ID: l.ID(),
|
||||||
Created: l.CreatedTime().Format(time.RFC3339Nano),
|
Created: l.CreatedTime().Format(time.RFC3339Nano),
|
||||||
Path: "",
|
Path: inspect.Path,
|
||||||
Args: nil,
|
Args: inspect.Args,
|
||||||
State: &state,
|
State: &state,
|
||||||
Image: imageName,
|
Image: imageName,
|
||||||
ResolvConfPath: inspect.ResolvConfPath,
|
ResolvConfPath: inspect.ResolvConfPath,
|
||||||
@ -331,7 +331,7 @@ func LibpodToContainerJSON(l *libpod.Container, sz bool) (*types.ContainerJSON,
|
|||||||
LogPath: l.LogPath(),
|
LogPath: l.LogPath(),
|
||||||
Node: nil,
|
Node: nil,
|
||||||
Name: fmt.Sprintf("/%s", l.Name()),
|
Name: fmt.Sprintf("/%s", l.Name()),
|
||||||
RestartCount: 0,
|
RestartCount: int(inspect.RestartCount),
|
||||||
Driver: inspect.Driver,
|
Driver: inspect.Driver,
|
||||||
Platform: "linux",
|
Platform: "linux",
|
||||||
MountLabel: inspect.MountLabel,
|
MountLabel: inspect.MountLabel,
|
||||||
|
@ -17,6 +17,7 @@ import (
|
|||||||
"github.com/containers/podman/v2/pkg/api/handlers/utils"
|
"github.com/containers/podman/v2/pkg/api/handlers/utils"
|
||||||
"github.com/containers/podman/v2/pkg/rootless"
|
"github.com/containers/podman/v2/pkg/rootless"
|
||||||
docker "github.com/docker/docker/api/types"
|
docker "github.com/docker/docker/api/types"
|
||||||
|
"github.com/docker/docker/api/types/registry"
|
||||||
"github.com/docker/docker/api/types/swarm"
|
"github.com/docker/docker/api/types/swarm"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -103,7 +104,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
PidsLimit: sysInfo.PidsLimit,
|
PidsLimit: sysInfo.PidsLimit,
|
||||||
Plugins: docker.PluginsInfo{},
|
Plugins: docker.PluginsInfo{},
|
||||||
ProductLicense: "Apache-2.0",
|
ProductLicense: "Apache-2.0",
|
||||||
RegistryConfig: nil,
|
RegistryConfig: new(registry.ServiceConfig),
|
||||||
RuncCommit: docker.Commit{},
|
RuncCommit: docker.Commit{},
|
||||||
Runtimes: getRuntimes(configInfo),
|
Runtimes: getRuntimes(configInfo),
|
||||||
SecurityOptions: getSecOpts(sysInfo),
|
SecurityOptions: getSecOpts(sysInfo),
|
||||||
|
@ -52,7 +52,7 @@ func (i *Image) Id() string { // nolint
|
|||||||
|
|
||||||
type ImageSummary struct {
|
type ImageSummary struct {
|
||||||
ID string `json:"Id"`
|
ID string `json:"Id"`
|
||||||
ParentId string `json:",omitempty"` // nolint
|
ParentId string // nolint
|
||||||
RepoTags []string `json:",omitempty"`
|
RepoTags []string `json:",omitempty"`
|
||||||
Created int64
|
Created int64
|
||||||
Size int64 `json:",omitempty"`
|
Size int64 `json:",omitempty"`
|
||||||
|
Reference in New Issue
Block a user