mirror of https://github.com/docker/docs.git
				
				
				
			Update to new swarmkit/engine-api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 9b652738363d92fbe6e43b3981cdcc94bdb72c76)
This commit is contained in:
		
							parent
							
								
									7d835ed934
								
							
						
					
					
						commit
						4905c858db
					
				|  | @ -28,7 +28,7 @@ func New(client client.APIClient, noResolve bool) *IDResolver { | ||||||
| func (r *IDResolver) get(ctx context.Context, t interface{}, id string) (string, error) { | func (r *IDResolver) get(ctx context.Context, t interface{}, id string) (string, error) { | ||||||
| 	switch t.(type) { | 	switch t.(type) { | ||||||
| 	case swarm.Node: | 	case swarm.Node: | ||||||
| 		node, err := r.client.NodeInspect(ctx, id) | 		node, _, err := r.client.NodeInspectWithRaw(ctx, id) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return id, nil | 			return id, nil | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -49,7 +49,7 @@ func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error { | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return nil, nil, err | 			return nil, nil, err | ||||||
| 		} | 		} | ||||||
| 		node, err := client.NodeInspect(ctx, nodeRef) | 		node, _, err := client.NodeInspectWithRaw(ctx, nodeRef) | ||||||
| 		return node, nil, err | 		return node, nil, err | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -48,7 +48,7 @@ func runTasks(dockerCli *client.DockerCli, opts tasksOptions) error { | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return nil | 		return nil | ||||||
| 	} | 	} | ||||||
| 	node, err := client.NodeInspect(ctx, nodeRef) | 	node, _, err := client.NodeInspectWithRaw(ctx, nodeRef) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -42,7 +42,7 @@ func updateNodes(dockerCli *client.DockerCli, nodes []string, mergeNode func(nod | ||||||
| 	ctx := context.Background() | 	ctx := context.Background() | ||||||
| 
 | 
 | ||||||
| 	for _, nodeID := range nodes { | 	for _, nodeID := range nodes { | ||||||
| 		node, err := client.NodeInspect(ctx, nodeID) | 		node, _, err := client.NodeInspectWithRaw(ctx, nodeID) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
| 			return err | 			return err | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|  | @ -117,8 +117,8 @@ func (c *containerConfig) config() *enginecontainer.Config { | ||||||
| 		// If Command is provided, we replace the whole invocation with Command
 | 		// If Command is provided, we replace the whole invocation with Command
 | ||||||
| 		// by replacing Entrypoint and specifying Cmd. Args is ignored in this
 | 		// by replacing Entrypoint and specifying Cmd. Args is ignored in this
 | ||||||
| 		// case.
 | 		// case.
 | ||||||
| 		config.Entrypoint = append(config.Entrypoint, c.spec().Command[0]) | 		config.Entrypoint = append(config.Entrypoint, c.spec().Command...) | ||||||
| 		config.Cmd = append(config.Cmd, c.spec().Command[1:]...) | 		config.Cmd = append(config.Cmd, c.spec().Args...) | ||||||
| 	} else if len(c.spec().Args) > 0 { | 	} else if len(c.spec().Args) > 0 { | ||||||
| 		// In this case, we assume the image has an Entrypoint and Args
 | 		// In this case, we assume the image has an Entrypoint and Args
 | ||||||
| 		// specifies the arguments for that entrypoint.
 | 		// specifies the arguments for that entrypoint.
 | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ import ( | ||||||
| 
 | 
 | ||||||
| 	"github.com/docker/docker/container" | 	"github.com/docker/docker/container" | ||||||
| 	"github.com/docker/docker/libcontainerd" | 	"github.com/docker/docker/libcontainerd" | ||||||
| 	"github.com/docker/engine-api/types" |  | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateOption, error) { | func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Container) (*[]libcontainerd.CreateOption, error) { | ||||||
|  | @ -13,7 +12,7 @@ func (daemon *Daemon) getLibcontainerdCreateOptions(container *container.Contain | ||||||
| 
 | 
 | ||||||
| 	// Ensure a runtime has been assigned to this container
 | 	// Ensure a runtime has been assigned to this container
 | ||||||
| 	if container.HostConfig.Runtime == "" { | 	if container.HostConfig.Runtime == "" { | ||||||
| 		container.HostConfig.Runtime = types.DefaultRuntimeName | 		container.HostConfig.Runtime = stockRuntimeName | ||||||
| 		container.ToDisk() | 		container.ToDisk() | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue