func (c DockerClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec) error {
	_, err := c.dc.ServiceUpdate(
		ctx, serviceID, version, service,
		types.ServiceUpdateOptions{
			RegistryAuthFrom: types.RegistryAuthFromSpec,
		})
	return err
}
ServiceUpdate wraps `dc.ServiceUpdate`
package service
import (
	"context"
	"github.com/docker/docker/api/types"
	"github.com/docker/docker/api/types/filters"
	"github.com/docker/docker/api/types/swarm"
	"github.com/docker/docker/client"
)
var dockerAPIVersion = "v1.37"
type DockerClient struct {
	dc *client.Client
}
func NewDockerClientFromEnv() (DockerClient, error) {
	host := "unix:///var/run/docker.sock"
	defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"}
	c, err := client.NewClient(host, dockerAPIVersion, nil, defaultHeaders)
	if err != nil {
		return DockerClient{}, err
	}
	c.NegotiateAPIVersion(context.Background())
	return DockerClient{c}, nil
}
func (c DockerClient) ServiceInspect(ctx context.Context, serviceID string) (swarm.Service, error) {
	service, _, err := c.dc.ServiceInspectWithRaw(ctx, serviceID, types.ServiceInspectOptions{})
	return service, err
}