diff --git a/api/client/idresolver/idresolver.go b/api/client/idresolver/idresolver.go index 05c4c9c366..b958bd0672 100644 --- a/api/client/idresolver/idresolver.go +++ b/api/client/idresolver/idresolver.go @@ -40,7 +40,7 @@ func (r *IDResolver) get(ctx context.Context, t interface{}, id string) (string, } return id, nil case swarm.Service: - service, err := r.client.ServiceInspect(ctx, id) + service, _, err := r.client.ServiceInspectWithRaw(ctx, id) if err != nil { return id, nil } diff --git a/api/client/service/inspect.go b/api/client/service/inspect.go index bd36d3ed06..1c2edb051a 100644 --- a/api/client/service/inspect.go +++ b/api/client/service/inspect.go @@ -50,7 +50,7 @@ func runInspect(dockerCli *client.DockerCli, opts inspectOptions) error { ctx := context.Background() getRef := func(ref string) (interface{}, []byte, error) { - service, err := client.ServiceInspect(ctx, ref) + service, _, err := client.ServiceInspectWithRaw(ctx, ref) if err == nil || !apiclient.IsErrServiceNotFound(err) { return service, nil, err } diff --git a/api/client/service/scale.go b/api/client/service/scale.go index 2962f29091..e313948aca 100644 --- a/api/client/service/scale.go +++ b/api/client/service/scale.go @@ -61,7 +61,8 @@ func runServiceScale(dockerCli *client.DockerCli, serviceID string, scale string client := dockerCli.Client() ctx := context.Background() - service, err := client.ServiceInspect(ctx, serviceID) + service, _, err := client.ServiceInspectWithRaw(ctx, serviceID) + if err != nil { return err } diff --git a/api/client/service/tasks.go b/api/client/service/tasks.go index 6169d8bdb7..7520b1f16d 100644 --- a/api/client/service/tasks.go +++ b/api/client/service/tasks.go @@ -44,7 +44,7 @@ func runTasks(dockerCli *client.DockerCli, opts tasksOptions) error { client := dockerCli.Client() ctx := context.Background() - service, err := client.ServiceInspect(ctx, opts.serviceID) + service, _, err := client.ServiceInspectWithRaw(ctx, opts.serviceID) if err != nil { return err } diff --git a/api/client/service/update.go b/api/client/service/update.go index 20bc386ba3..c8e3a6d7a5 100644 --- a/api/client/service/update.go +++ b/api/client/service/update.go @@ -41,7 +41,7 @@ func runUpdate(dockerCli *client.DockerCli, flags *pflag.FlagSet, serviceID stri client := dockerCli.Client() ctx := context.Background() - service, err := client.ServiceInspect(ctx, serviceID) + service, _, err := client.ServiceInspectWithRaw(ctx, serviceID) if err != nil { return err }