summaryrefslogtreecommitdiff
path: root/cmd/podman/create.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-12-18 11:44:19 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2018-12-21 15:59:34 -0500
commitc657dc4fdbca4b331d69e0910261e2cb11e2a629 (patch)
treefa75b6ecfbaf7c3c85ab7548fe1ac29d1612cf47 /cmd/podman/create.go
parentfe186c6ebba95db89463f38c6aa0f0dcc104a249 (diff)
downloadpodman-c657dc4fdbca4b331d69e0910261e2cb11e2a629.tar.gz
podman-c657dc4fdbca4b331d69e0910261e2cb11e2a629.tar.bz2
podman-c657dc4fdbca4b331d69e0910261e2cb11e2a629.zip
Switch all referencs to image.ContainerConfig to image.Config
This will more closely match what Docker is doing. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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": "",