docker2aci

package
v0.0.0-...-a4e343c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2017 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package docker2aci implements a simple library for converting docker images to App Container Images (ACIs).

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.15.0+git"

Functions

func ConvertRemoteRepo

func ConvertRemoteRepo(dockerURL string, config RemoteConfig) ([]string, error)

ConvertRemoteRepo generates ACI images from docker registry URLs. It takes as input a dockerURL of the form:

{registry URL}/{repository}:{reference[tag|digest]}

It then gets all the layers of the requested image and converts each of them to ACI. It returns the list of generated ACI paths.

func ConvertSavedFile

func ConvertSavedFile(dockerSavedFile string, config FileConfig) ([]string, error)

ConvertSavedFile generates ACI images from a file generated with "docker save". If there are several images/tags in the file, a particular image can be chosen via FileConfig.DockerURL.

It returns the list of generated ACI paths.

func GetDockercfgAuth

func GetDockercfgAuth(indexServer string) (string, string, error)

GetDockercfgAuth reads a ~/.dockercfg file and returns the username and password of the given docker index server.

func GetIndexName

func GetIndexName(dockerURL string) string

GetIndexName returns the docker index server from a docker URL.

Types

type CommonConfig

type CommonConfig struct {
	Squash                bool               // squash the layers in one file
	OutputDir             string             // where to put the resulting ACI
	TmpDir                string             // directory to use for temporary files
	Compression           common.Compression // which compression to use for the resulting file(s)
	CurrentManifestHashes []string           // any manifest hashes the caller already has

	Info  log.Logger
	Debug log.Logger
}

CommonConfig represents the shared configuration options for converting Docker images.

type FileConfig

type FileConfig struct {
	CommonConfig
	DockerURL string // select an image if there are several images/tags in the file, Syntax: "{docker registry URL}/{image name}:{tag}"
}

FileConfig represents the saved file specific configuration for converting Docker images.

type RemoteConfig

type RemoteConfig struct {
	CommonConfig
	Username        string                // username to use if the image to convert needs authentication
	Password        string                // password to use if the image to convert needs authentication
	Insecure        common.InsecureConfig // Insecure options
	MediaTypes      common.MediaTypeSet
	RegistryOptions common.RegistryOptionSet
}

RemoteConfig represents the remote repository specific configuration for converting Docker images.

Directories

Path Synopsis
Package common provides misc types and variables.
Package common provides misc types and variables.
Package internal provides functions shared by different parts of docker2aci.
Package internal provides functions shared by different parts of docker2aci.
backend/file
Package file is an implementation of Docker2ACIBackend for files saved via "docker save".
Package file is an implementation of Docker2ACIBackend for files saved via "docker save".
backend/repository
Package repository is an implementation of Docker2ACIBackend for Docker remote registries.
Package repository is an implementation of Docker2ACIBackend for Docker remote registries.
tarball
Package tarball provides functions to manipulate tar files.
Package tarball provides functions to manipulate tar files.
util
Package util defines convenience functions for handling slices and debugging.
Package util defines convenience functions for handling slices and debugging.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL