package main import ( "github.com/docker/docker/client" "context" ) const ( fixedDockerVersion = "1.38" ) var ( dockerCtx context.Context dockerCli *client.Client ) func setupContext() { if dockerCtx == nil { dockerCtx = context.Background() } } func setupDockerCLI() (err error) { if dockerCli == nil { dockerCli, err = client.NewClientWithOpts(client.WithVersion(fixedDockerVersion)) } return err }