package docker2aci
import "github.com/appc/docker2aci/lib"
Package docker2aci implements a simple library for converting docker images to App Container Images (ACIs).
Index ¶
- Variables
- func ConvertRemoteRepo(dockerURL string, config RemoteConfig) ([]string, error)
- func ConvertSavedFile(dockerSavedFile string, config FileConfig) ([]string, error)
- func GetDockercfgAuth(indexServer string) (string, string, error)
- func GetIndexName(dockerURL string) string
- type CommonConfig
- type FileConfig
- type RemoteConfig
Variables ¶
var AppcVersion = schema.AppContainerVersion
var Version = "0.17.2"
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 ¶
GetDockercfgAuth reads a ~/.dockercfg file and returns the username and password of the given docker index server.
func GetIndexName ¶
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.
Source Files ¶
conversion_store.go docker2aci.go version.go
Directories ¶
Path | Synopsis |
---|---|
lib/common | Package common provides misc types and variables. |
lib/internal | Package internal provides functions shared by different parts of docker2aci. |
lib/tests |
- Version
- v0.17.2 (latest)
- Published
- Apr 13, 2018
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 16 hours ago –
Tools for package owners.