fixed some issues with container downloads
This commit is contained in:
parent
d66becd12c
commit
6414d4e21e
3 changed files with 6 additions and 2 deletions
|
@ -182,7 +182,7 @@ func daemon(client dockerclient.Client, conf *dockerclient.ContainerConfig, pull
|
|||
id, err = client.CreateContainer(conf, "")
|
||||
// make sure the container is removed in
|
||||
// the event of a creation error.
|
||||
if len(id) != 0 {
|
||||
if err != nil && len(id) != 0 {
|
||||
client.RemoveContainer(id, true, true)
|
||||
}
|
||||
if err != nil {
|
||||
|
|
|
@ -24,6 +24,10 @@ func toContainerConfig(step *common.Step) *dockerclient.ContainerConfig {
|
|||
},
|
||||
}
|
||||
|
||||
if len(config.Entrypoint) == 0 {
|
||||
config.Entrypoint = nil
|
||||
}
|
||||
|
||||
config.Volumes = map[string]struct{}{}
|
||||
for _, path := range step.Volumes {
|
||||
if strings.Index(path, ":") == -1 {
|
||||
|
|
|
@ -170,7 +170,7 @@ func run(client dockerclient.Client, conf *dockerclient.ContainerConfig, name st
|
|||
id, err = client.CreateContainer(conf, name)
|
||||
// make sure the container is removed in
|
||||
// the event of a creation error.
|
||||
if len(id) != 0 {
|
||||
if err != nil && len(id) != 0 {
|
||||
client.RemoveContainer(id, true, true)
|
||||
}
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue