summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
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 /cmd/podman/create.go
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 'cmd/podman/create.go')
-rw-r--r--cmd/podman/create.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 1425892cc..dae429047 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -344,7 +344,7 @@ func configureEntrypoint(c *cli.Context, data *inspect.ImageData) []string {
return []string{c.String("entrypoint")}
}
if data != nil {
- return data.ContainerConfig.Entrypoint
+ return data.Config.Entrypoint
}
return entrypoint
}
@@ -474,7 +474,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
// EXPOSED PORTS
var portBindings map[nat.Port][]nat.PortBinding
if data != nil {
- portBindings, err = cc.ExposedPorts(c.StringSlice("expose"), c.StringSlice("publish"), c.Bool("publish-all"), data.ContainerConfig.ExposedPorts)
+ portBindings, err = cc.ExposedPorts(c.StringSlice("expose"), c.StringSlice("publish"), c.Bool("publish-all"), data.Config.ExposedPorts)
if err != nil {
return nil, err
}
@@ -567,7 +567,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if data == nil {
user = "0"
} else {
- user = data.ContainerConfig.User
+ user = data.Config.User
}
}
@@ -575,7 +575,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
stopSignal := syscall.SIGTERM
signalString := ""
if data != nil {
- signalString = data.ContainerConfig.StopSignal
+ signalString = data.Config.StopSignal
}
if c.IsSet("stop-signal") {
signalString = c.String("stop-signal")
@@ -590,7 +590,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
// ENVIRONMENT VARIABLES
env := defaultEnvVariables
if data != nil {
- for _, e := range data.ContainerConfig.Env {
+ for _, e := range data.Config.Env {
split := strings.SplitN(e, "=", 2)
if len(split) > 1 {
env[split[0]] = split[1]
@@ -609,7 +609,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
return nil, errors.Wrapf(err, "unable to process labels")
}
if data != nil {
- for key, val := range data.ContainerConfig.Labels {
+ for key, val := range data.Config.Labels {
if _, ok := labels[key]; !ok {
labels[key] = val
}
@@ -643,8 +643,8 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
workDir := "/"
if c.IsSet("workdir") || c.IsSet("w") {
workDir = c.String("workdir")
- } else if data != nil && data.ContainerConfig.WorkingDir != "" {
- workDir = data.ContainerConfig.WorkingDir
+ } else if data != nil && data.Config.WorkingDir != "" {
+ workDir = data.Config.WorkingDir
}
entrypoint := configureEntrypoint(c, data)
@@ -656,9 +656,9 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
if len(inputCommand) > 0 {
// User command overrides data CMD
command = append(command, inputCommand...)
- } else if data != nil && len(data.ContainerConfig.Cmd) > 0 && !c.IsSet("entrypoint") {
+ } else if data != nil && len(data.Config.Cmd) > 0 && !c.IsSet("entrypoint") {
// If not user command, add CMD
- command = append(command, data.ContainerConfig.Cmd...)
+ command = append(command, data.Config.Cmd...)
}
if data != nil && len(command) == 0 {
@@ -697,7 +697,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
var ImageVolumes map[string]struct{}
if data != nil {
- ImageVolumes = data.ContainerConfig.Volumes
+ ImageVolumes = data.Config.Volumes
}
var imageVolType = map[string]string{
"bind": "",