You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/werf/pkg/docker
    
    the code of the file until where you have to start completion: package docker

import (
	"bytes"
	"fmt"
	"io"
	"os"
	"path/filepath"

	"github.com/containerd/containerd/platforms"
	"github.com/docker/cli/cli/command"
	cliconfig "github.com/docker/cli/cli/config"
	"github.com/docker/cli/cli/flags"
	"github.com/docker/docker/api/types"
	"github.com/docker/docker/client"
	"github.co
    
func Init(ctx context.Context, opts InitOptions) error {
	if opts.DockerConfigDir != "" {
		DockerConfigDir = opts.DockerConfigDir
		cliconfig.SetDir(opts.DockerConfigDir)
	} else {
		DockerConfigDir = filepath.Join(os.Getenv("HOME"), ".docker")
	}

	err := os.Setenv("DOCKER_CONFIG", DockerConfigDir)
	if err != nil {
		return fmt.Errorf("cannot set DOCKER_CONFIG to %s: %w", DockerConfigDir, err)
	}

	isDebug = os.Getenv("WERF_DEBUG_DOCKER") == "1"
	liveCliOutputEnabled = opts.Verbose || opts.Debug

	defaultCLI, err = newDockerCli(defaultCliOptions(ctx))
	if err != nil {
		return err
	}

	spec := platforms.DefaultSpec()
	spec.OS = defaultCLI.ServerInfo().OSType
	runtimePlatform = platforms.Format(spec)
	claimPlatforms := opts.ClaimPlatforms

	if opts.DefaultPlatform != "" {
		defaultPlatform = opts.DefaultPlatform
		os.Setenv("DOCKER_DEFAULT_PLATFORM", opts.DefaultPlatform)
		claimPlatforms = append(claimPlatforms, opts.DefaultPlatform)
	} else {
		defaultPlatform = runtimePlatform
	}

	for _, claimPlatform := range claimPlatforms {
		if claimPlatform != runtimePlatform {
			useBuildx = true
			break
		}
	}

	if v := os.Getenv("DOCKER_BUILDKIT"); v == "1" || v == "true" {
		if err := os.Setenv("DOCKER_BUILDKIT", "0"); err != nil {
			return fmt.Errorf("unable to set env var: %w", err)
		}
		useBuildx = true
	}

	return nil
}