summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-22 03:11:08 -0800
committerGitHub <noreply@github.com>2018-12-22 03:11:08 -0800
commit792f10988ed2badcce9a11a880303614412b9a00 (patch)
tree96386ffcf059e1f5464db09e374e0cdc8a021430 /pkg
parent7122b49464519252a4f91ce1df337150ca24be42 (diff)
parentc657dc4fdbca4b331d69e0910261e2cb11e2a629 (diff)
downloadpodman-792f10988ed2badcce9a11a880303614412b9a00.tar.gz
podman-792f10988ed2badcce9a11a880303614412b9a00.tar.bz2
podman-792f10988ed2badcce9a11a880303614412b9a00.zip
Merge pull request #2023 from rhatdan/config
Switch all references to image.ContainerConfig to image.Config
Diffstat (limited to 'pkg')
-rw-r--r--pkg/inspect/inspect.go42
-rw-r--r--pkg/varlinkapi/containers_create.go12
2 files changed, 27 insertions, 27 deletions
diff --git a/pkg/inspect/inspect.go b/pkg/inspect/inspect.go
index 5bdcf677f..dcb7738be 100644
--- a/pkg/inspect/inspect.go
+++ b/pkg/inspect/inspect.go
@@ -106,27 +106,27 @@ type LogConfig struct {
// ImageData holds the inspect information of an image
type ImageData struct {
- ID string `json:"Id"`
- Digest digest.Digest `json:"Digest"`
- RepoTags []string `json:"RepoTags"`
- RepoDigests []string `json:"RepoDigests"`
- Parent string `json:"Parent"`
- Comment string `json:"Comment"`
- Created *time.Time `json:"Created"`
- ContainerConfig *v1.ImageConfig `json:"ContainerConfig"`
- Version string `json:"Version"`
- Author string `json:"Author"`
- Architecture string `json:"Architecture"`
- Os string `json:"Os"`
- Size int64 `json:"Size"`
- VirtualSize int64 `json:"VirtualSize"`
- GraphDriver *Data `json:"GraphDriver"`
- RootFS *RootFS `json:"RootFS"`
- Labels map[string]string `json:"Labels"`
- Annotations map[string]string `json:"Annotations"`
- ManifestType string `json:"ManifestType"`
- User string `json:"User"`
- History []v1.History `json:"History"`
+ ID string `json:"Id"`
+ Digest digest.Digest `json:"Digest"`
+ RepoTags []string `json:"RepoTags"`
+ RepoDigests []string `json:"RepoDigests"`
+ Parent string `json:"Parent"`
+ Comment string `json:"Comment"`
+ Created *time.Time `json:"Created"`
+ Config *v1.ImageConfig `json:"Config"`
+ Version string `json:"Version"`
+ Author string `json:"Author"`
+ Architecture string `json:"Architecture"`
+ Os string `json:"Os"`
+ Size int64 `json:"Size"`
+ VirtualSize int64 `json:"VirtualSize"`
+ GraphDriver *Data `json:"GraphDriver"`
+ RootFS *RootFS `json:"RootFS"`
+ Labels map[string]string `json:"Labels"`
+ Annotations map[string]string `json:"Annotations"`
+ ManifestType string `json:"ManifestType"`
+ User string `json:"User"`
+ History []v1.History `json:"History"`
}
// RootFS holds the root fs information of an image
diff --git a/pkg/varlinkapi/containers_create.go b/pkg/varlinkapi/containers_create.go
index bb6273fd1..63bc93686 100644
--- a/pkg/varlinkapi/containers_create.go
+++ b/pkg/varlinkapi/containers_create.go
@@ -82,7 +82,7 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru
// ENTRYPOINT
// User input entrypoint takes priority over image entrypoint
if len(entrypoint) == 0 {
- entrypoint = data.ContainerConfig.Entrypoint
+ entrypoint = data.Config.Entrypoint
}
// if entrypoint=, we need to clear the entrypoint
if len(entrypoint) == 1 && strings.Join(create.Entrypoint, "") == "" {
@@ -96,9 +96,9 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru
if len(inputCommand) > 0 {
// User command overrides data CMD
command = append(command, inputCommand...)
- } else if len(data.ContainerConfig.Cmd) > 0 && len(command) == 0 {
+ } else if len(data.Config.Cmd) > 0 && len(command) == 0 {
// If not user command, add CMD
- command = append(command, data.ContainerConfig.Cmd...)
+ command = append(command, data.Config.Cmd...)
}
if create.Resources.Blkio_weight != 0 {
@@ -115,11 +115,11 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru
user := create.User
if user == "" {
- user = data.ContainerConfig.User
+ user = data.Config.User
}
// EXPOSED PORTS
- portBindings, err := cc.ExposedPorts(create.Exposed_ports, create.Publish, create.Publish_all, data.ContainerConfig.ExposedPorts)
+ portBindings, err := cc.ExposedPorts(create.Exposed_ports, create.Publish, create.Publish_all, data.Config.ExposedPorts)
if err != nil {
return nil, err
}
@@ -143,7 +143,7 @@ func varlinkCreateToCreateConfig(ctx context.Context, create iopodman.Create, ru
imageID := data.ID
config := &cc.CreateConfig{
Runtime: runtime,
- BuiltinImgVolumes: data.ContainerConfig.Volumes,
+ BuiltinImgVolumes: data.Config.Volumes,
ConmonPidFile: create.Conmon_pidfile,
ImageVolumeType: create.Image_volume_type,
CapAdd: create.Cap_add,