ab079c
% CONTAINERS-TRANSPORTS(5) Containers Transports Man Page
ab079c
% Valentin Rothberg
ab079c
% April 2019
ab079c
ab079c
## NAME
ab079c
ab079c
containers-transports - description of supported transports for copying and storing container images
ab079c
ab079c
## DESCRIPTION
ab079c
ab079c
Tools which use the containers/image library, including skopeo(1), buildah(1), podman(1), all share a common syntax for referring to container images in various locations.
ab079c
The general form of the syntax is _transport:details_, where details are dependent on the specified transport, which are documented below.
ab079c
ab079c
### **containers-storage:** [storage-specifier]{image-id|docker-reference[@image-id]}
ab079c
ab079c
An image located in a local containers storage.
ab079c
The format of _docker-reference_ is described in detail in the **docker** transport.
ab079c
ab079c
The _storage-specifier_ allows for referencing storage locations on the file system and has the format `[[driver@]root[+run-root][:options]]` where the optional `driver` refers to the storage driver (e.g., overlay or btrfs) and where `root` is an absolute path to the storage's root directory.
ab079c
The optional `run-root` can be used to specify the run directory of the storage where all temporary writable content is stored.
ab079c
The optional `options` are a comma-separated list of driver-specific options.
ab079c
Please refer to containers-storage.conf(5) for further information on the drivers and supported options.
ab079c
ab079c
### **dir:**_path_
ab079c
ab079c
An existing local directory _path_ storing the manifest, layer tarballs and signatures as individual files.
ab079c
This is a non-standardized format, primarily useful for debugging or noninvasive container inspection.
ab079c
ab079c
### **docker://**_docker-reference_
ab079c
ab079c
An image in a registry implementing the "Docker Registry HTTP API V2".
ab079c
By default, uses the authorization state in `$XDG_RUNTIME_DIR/containers/auth.json`, which is set using podman-login(1).
ab079c
If the authorization state is not found there, `$HOME/.docker/config.json` is checked, which is set using docker-login(1).
ab079c
The containers-registries.conf(5) further allows for configuring various settings of a registry.
ab079c
ab079c
Note that a _docker-reference_ has the following format: `name[:tag|@digest]`.
ab079c
While the docker transport does not support both a tag and a digest at the same time some formats like containers-storage do.
ab079c
Digests can also be used in an image destination as long as the manifest matches the provided digest.
ab079c
The digest of images can be explored with skopeo-inspect(1).
ab079c
If `name` does not contain a slash, it is treated as `docker.io/library/name`.
ab079c
Otherwise, the component before the first slash is checked if it is recognized as a `hostname[:port]` (i.e., it contains either a . or a :, or the component is exactly localhost).
ab079c
If the first component of name is not recognized as a `hostname[:port]`, `name` is treated as `docker.io/name`.
ab079c
ab079c
### **docker-archive:**_path[:docker-reference]_
ab079c
ab079c
An image is stored in the docker-save(1) formatted file.
ab079c
_docker-reference_ is only used when creating such a file, and it must not contain a digest.
ab079c
It is further possible to copy data to stdin by specifying `docker-archive:/dev/stdin` but note that the used file must be seekable.
ab079c
ab079c
### **docker-daemon:**_docker-reference|algo:digest_
ab079c
ab079c
An image stored in the docker daemon's internal storage.
ab079c
The image must be specified as a _docker-reference_ or in an alternative _algo:digest_ format when being used as an image source.
ab079c
The _algo:digest_ refers to the image ID reported by docker-inspect(1).
ab079c
ab079c
### **oci:**_path[:tag]_
ab079c
ab079c
An image compliant with the "Open Container Image Layout Specification" at _path_.
ab079c
Using a _tag_ is optional and allows for storing multiple images at the same _path_.
ab079c
ab079c
### **oci-archive:**_path[:tag]_
ab079c
ab079c
An image compliant with the "Open Container Image Layout Specification" stored as a tar(1) archive at _path_.
ab079c
ab079c
### **ostree:**_docker-reference[@/absolute/repo/path]_
ab079c
ab079c
An image in the local ostree(1) repository.
ab079c
_/absolute/repo/path_ defaults to _/ostree/repo_.
ab079c
ab079c
## Examples
ab079c
ab079c
The following examples demonstrate how some of the containers transports can be used.
ab079c
The examples use skopeo-copy(1) for copying container images.
ab079c
ab079c
**Copying an image from one registry to another**:
ab079c
```
ab079c
$ skopeo copy docker://docker.io/library/alpine:latest docker://localhost:5000/alpine:latest
ab079c
```
ab079c
ab079c
**Copying an image from a running Docker daemon to a directory in the OCI layout**:
ab079c
```
ab079c
$ mkdir alpine-oci
ab079c
$ skopeo copy docker-daemon:alpine:latest oci:alpine-oci
ab079c
$ tree alpine-oci
ab079c
test-oci/
ab079c
├── blobs
ab079c
│   └── sha256
ab079c
│       ├── 83ef92b73cf4595aa7fe214ec6747228283d585f373d8f6bc08d66bebab531b7
ab079c
│       ├── 9a6259e911dcd0a53535a25a9760ad8f2eded3528e0ad5604c4488624795cecc
ab079c
│       └── ff8df268d29ccbe81cdf0a173076dcfbbea4bb2b6df1dd26766a73cb7b4ae6f7
ab079c
├── index.json
ab079c
└── oci-layout
ab079c
ab079c
2 directories, 5 files
ab079c
```
ab079c
ab079c
**Copying an image from a registry to the local storage**:
ab079c
```
ab079c
$ skopeo copy docker://docker.io/library/alpine:latest containers-storage:alpine:latest
ab079c
```
ab079c
ab079c
## SEE ALSO
ab079c
ab079c
docker-login(1), docker-save(1), ostree(1), podman-login(1), skopeo-copy(1), skopeo-inspect(1), tar(1), container-registries.conf(5), containers-storage.conf(5)
ab079c
ab079c
## AUTHORS
ab079c
ab079c
Miloslav Trmač <mitr@redhat.com>
ab079c
Valentin Rothberg <rothberg@redhat.com>