Compare commits

..

No commits in common. "c8-stream-1.0" and "c8-stream-3.0" have entirely different histories.

21 changed files with 4579 additions and 227 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/skopeo-1715c90.tar.gz SOURCES/release-1.2-7300333.tar.gz

View File

@ -1 +1 @@
f258c639bda55165978c076e13bac72388e4ff14 SOURCES/skopeo-1715c90.tar.gz 163a914d0509187c816c20c622ad97418fc1db84 SOURCES/release-1.2-7300333.tar.gz

View File

@ -0,0 +1,71 @@
% containers-auth.json(5)
# NAME
containers-auth.json - syntax for the registry authentication file
# DESCRIPTION
A credentials file in JSON format used to authenticate against container image registries.
The primary (read/write) file is stored at `${XDG_RUNTIME_DIR}/containers/auth.json` on Linux;
on Windows and macOS, at `$HOME/.config/containers/auth.json`.
When searching for the credential for a registry, the following files will be read in sequence until the valid credential is found:
first reading the primary (read/write) file, or the explicit override using an option of the calling application.
If credentials are not present, search in `${XDG\_CONFIG\_HOME}/containers/auth.json`, `$HOME/.docker/config.json`, `$HOME/.dockercfg`.
Except the primary (read/write) file, other files are read-only, unless the user use an option of the calling application explicitly points at it as an override.
## FORMAT
The auth.json file stores encrypted authentication information for the
user to container image registries. The file can have zero to many entries and
is created by a `login` command from a container tool such as `podman login`,
`buildah login` or `skopeo login`. Each entry includes the name of the registry and then an auth
token in the form of a base64 encoded string from the concatenation of the
username, a colon, and the password.
The following example shows the values found in auth.json after the user logged in to
their accounts on quay.io and docker.io:
```
{
"auths": {
"docker.io": {
"auth": "erfi7sYi89234xJUqaqxgmzcnQ2rRFWM5aJX0EC="
},
"quay.io": {
"auth": "juQAqGmz5eR1ipzx8Evn6KGdw8fEa1w5MWczmgY="
}
}
}
```
An entry can be removed by using a `logout` command from a container
tool such as `podman logout` or `buildah logout`.
In addition, credential helpers can be configured for specific registries and the credentials-helper
software can be used to manage the credentials in a more secure way than depending on the base64 encoded authentication
provided by `login`. If the credential helpers are configured for specific registries, the base64 encoded authentication will not be used
for operations concerning credentials of the specified registries.
When the credential helper is in use on a Linux platform, the auth.json file would contain keys that specify the registry domain, and values that specify the suffix of the program to use (i.e. everything after docker-credential-). For example:
```
{
"auths": {
"localhost:5001": {}
},
"credHelpers": {
"registry.example.com": "secretservice"
}
}
```
For more information on credential helpers, please reference the [GitHub docker-credential-helpers project](https://github.com/docker/docker-credential-helpers/releases).
# SEE ALSO
buildah-login(1), buildah-logout(1), podman-login(1), podman-logout(1), skopeo-login(1), skopeo-logout(1)
# HISTORY
Feb 2020, Originally compiled by Tom Sweeney <tsweeney@redhat.com>

View File

@ -0,0 +1,28 @@
% containers-certs.d(5)
# NAME
containers-certs.d - Directory for storing custom container-registry TLS configurations
# DESCRIPTION
A custom TLS configuration for a container registry can be configured by creating a directory under `$HOME/.config/containers/certs.d` or `/etc/containers/certs.d`.
The name of the directory must correspond to the `host:port` of the registry (e.g., `my-registry.com:5000`).
## Directory Structure
A certs directory can contain one or more files with the following extensions:
* `*.crt` files with this extensions will be interpreted as CA certificates
* `*.cert` files with this extensions will be interpreted as client certificates
* `*.key` files with this extensions will be interpreted as client keys
Note that the client certificate-key pair will be selected by the file name (e.g., `client.{cert,key}`).
An examplary setup for a registry running at `my-registry.com:5000` may look as follows:
```
/etc/containers/certs.d/ <- Certificate directory
└── my-registry.com:5000 <- Hostname:port
├── client.cert <- Client certificate
├── client.key <- Client key
└── ca.crt <- Certificate authority that signed the registry certificate
```
# HISTORY
Feb 2019, Originally compiled by Valentin Rothberg <rothberg@redhat.com>

View File

@ -0,0 +1,16 @@
% containers-mounts.conf(5)
## NAME
containers-mounts.conf - configuration file for default mounts in containers
## DESCRIPTION
The mounts.conf file specifies volume mount directories that are automatically mounted inside containers. Container processes can then use this content. Usually these directories are used for passing secrets or credentials required by the package software to access remote package repositories. Note that for security reasons, tools adhering to the mounts.conf are expected to copy the contents instead of bind mounting the paths from the host.
## FORMAT
The format of the mounts.conf is the volume format `/SRC:/DEST`, one mount per line. For example, a mounts.conf with the line `/usr/share/secrets:/run/secrets` would cause the contents of the `/usr/share/secrets` directory on the host to be mounted on the `/run/secrets` directory inside the container. Setting mountpoints allows containers to use the files of the host, for instance, to use the host's subscription to some enterprise Linux distribution.
## FILES
Some distributions may provide a `/usr/share/containers/mounts.conf` file to provide default mounts, but users can create a `/etc/containers/mounts.conf`, to specify their own special volumes to mount in the container. When Podman runs in rootless mode, the file `$HOME/.config/containers/mounts.conf` will override the default if it exists.
## HISTORY
Aug 2018, Originally compiled by Valentin Rothberg <vrothberg@suse.com>

View File

@ -1,17 +1,16 @@
% POLICY.JSON(5) policy.json Man Page % CONTAINERS-POLICY.JSON(5) policy.json Man Page
% Miloslav Trmač % Miloslav Trmač
% September 2016 % September 2016
# NAME # NAME
policy.json - Syntax for the Signature Verification Configuration File containers-policy.json - syntax for the signature verification policy file
## DESCRIPTION ## DESCRIPTION
Signature verification policy files are used to specify policy, e.g. trusted keys, Signature verification policy files are used to specify policy, e.g. trusted keys,
applicable when deciding whether to accept an image, or individual signatures of that image, as valid. applicable when deciding whether to accept an image, or individual signatures of that image, as valid.
The default policy is stored (unless overridden at compile-time) at `/etc/containers/policy.json`; By default, the policy is read from `$HOME/.config/containers/policy.json`, if it exists, otherwise from `/etc/containers/policy.json`; applications performing verification may allow using a different policy instead.
applications performing verification may allow using a different policy instead.
## FORMAT ## FORMAT
@ -66,7 +65,8 @@ The `atomic:` transport refers to images in an Atomic Registry.
Supported scopes use the form _hostname_[`:`_port_][`/`_namespace_[`/`_imagestream_ [`:`_tag_]]], Supported scopes use the form _hostname_[`:`_port_][`/`_namespace_[`/`_imagestream_ [`:`_tag_]]],
i.e. either specifying a complete name of a tagged image, or prefix denoting i.e. either specifying a complete name of a tagged image, or prefix denoting
a host/namespace/image stream. a host/namespace/image stream or a wildcarded expression for matching all
subdomains. For wildcarded subdomain matching, `*.example.com` is a valid case, but `example*.*.com` is not.
*Note:* The _hostname_ and _port_ refer to the Docker registry host and port (the one used *Note:* The _hostname_ and _port_ refer to the Docker registry host and port (the one used
e.g. for `docker pull`), _not_ to the OpenShift API host and port. e.g. for `docker pull`), _not_ to the OpenShift API host and port.
@ -91,7 +91,9 @@ Scopes matching individual images are named Docker references *in the fully expa
using a tag or digest. For example, `docker.io/library/busybox:latest` (*not* `busybox:latest`). using a tag or digest. For example, `docker.io/library/busybox:latest` (*not* `busybox:latest`).
More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest),
a repository namespace, or a registry host (by only specifying the host name). a repository namespace, or a registry host (by only specifying the host name)
or a wildcarded expression for matching all subdomains. For wildcarded subdomain
matching, `*.example.com` is a valid case, but `example*.*.com` is not.
### `oci:` ### `oci:`
@ -178,7 +180,7 @@ One of the following alternatives are supported:
```json ```json
{"type":"matchRepoDigestOrExact"} {"type":"matchRepoDigestOrExact"}
``` ```
- The identity in the signature must be in the same repository as the image identity. This is useful e.g. to pull an image using the `:latest` tag when the image is signed with a tag specifing an exact image version. - The identity in the signature must be in the same repository as the image identity. This is useful e.g. to pull an image using the `:latest` tag when the image is signed with a tag specifying an exact image version.
```json ```json
{"type":"matchRepository"} {"type":"matchRepository"}
@ -201,6 +203,30 @@ One of the following alternatives are supported:
"dockerRepository": docker_repository_value "dockerRepository": docker_repository_value
} }
``` ```
- Prefix remapping:
If the image identity matches the specified prefix, that prefix is replaced by the specified “signed prefix”
(otherwise it is used as unchanged and no remapping takes place);
matching then follows the `matchRepoDigestOrExact` semantics documented above
(i.e. if the image identity carries a tag, the identity in the signature must exactly match,
if it uses a digest reference, the repository must match).
The `prefix` and `signedPrefix` values can be either host[:port] values
(matching exactly the same host[:port], string),
repository namespaces, or repositories (i.e. they must not contain tags/digests),
and match as prefixes *of the fully expanded form*.
For example, `docker.io/library/busybox` (*not* `busybox`) to specify that single repository,
or `docker.io/library` (not an empty string) to specify the parent namespace of `docker.io/library/busybox`==`busybox`).
The `prefix` value is usually the same as the scope containing the parent `signedBy` requirement.
```js
{
"type": "remapIdentity",
"prefix": prefix,
"signedPrefix": prefix,
}
```
If the `signedIdentity` field is missing, it is treated as `matchRepoDigestOrExact`. If the `signedIdentity` field is missing, it is treated as `matchRepoDigestOrExact`.
@ -230,6 +256,8 @@ selectively allow individual transports and scopes as desired.
/* Similarly, allow installing the “official” busybox images. Note how the fully expanded /* Similarly, allow installing the “official” busybox images. Note how the fully expanded
form, with the explicit /library/, must be used. */ form, with the explicit /library/, must be used. */
"docker.io/library/busybox": [{"type": "insecureAcceptAnything"}] "docker.io/library/busybox": [{"type": "insecureAcceptAnything"}]
/* Allow installing images from all subdomains */
"*.temporary-project.example.com": [{"type": "insecureAcceptAnything"}]
/* Other docker: images use the global default policy and are rejected */ /* Other docker: images use the global default policy and are rejected */
}, },
"dir": { "dir": {
@ -261,6 +289,21 @@ selectively allow individual transports and scopes as desired.
"keyType": "GPGKeys", "keyType": "GPGKeys",
"keyPath": "/path/to/reviewer-pubkey.gpg" "keyPath": "/path/to/reviewer-pubkey.gpg"
} }
],
/* A way to mirror many repositories from a single vendor */
"private-mirror:5000/vendor-mirror": [
{ /* Require the image to be signed by the original vendor, using the vendor's repository location.
For example, private-mirror:5000/vendor-mirror/productA/image1:latest needs to be signed as
vendor.example/productA/image1:latest . */
"type": "signedBy",
"keyType": "GPGKeys",
"keyPath": "/path/to/vendor-pubkey.gpg",
"signedIdentity": {
"type": "remapIdentity",
"prefix": "private-mirror:5000/vendor-mirror",
"signedPrefix": "vendor.example.com",
}
}
] ]
} }
} }
@ -274,8 +317,10 @@ selectively allow individual transports and scopes as desired.
"default": [{"type": "insecureAcceptAnything"}] "default": [{"type": "insecureAcceptAnything"}]
} }
``` ```
# SEE ALSO ## SEE ALSO
atomic(1) atomic(1)
# HISTORY ## HISTORY
August 2018, Rename to containers-policy.json(5) by Valentin Rothberg <vrothberg@suse.com>
September 2016, Originally compiled by Miloslav Trmač <mitr@redhat.com> September 2016, Originally compiled by Miloslav Trmač <mitr@redhat.com>

View File

@ -0,0 +1,285 @@
% CONTAINERS-REGISTRIES.CONF(5) System-wide registry configuration file
% Brent Baude
% Aug 2017
# NAME
containers-registries.conf - Syntax of System Registry Configuration File
# DESCRIPTION
The CONTAINERS-REGISTRIES configuration file is a system-wide configuration
file for container image registries. The file format is TOML.
Container engines will use the `$HOME/.config/containers/registries.conf` if it exists, otherwise they will use `/etc/containers/registries.conf`
### GLOBAL SETTINGS
`unqualified-search-registries`
: An array of _host_[`:`_port_] registries to try when pulling an unqualified image, in order.
### NAMESPACED `[[registry]]` SETTINGS
The bulk of the configuration is represented as an array of `[[registry]]`
TOML tables; the settings may therefore differ among different registries
as well as among different namespaces/repositories within a registry.
#### Choosing a `[[registry]]` TOML table
Given an image name, a single `[[registry]]` TOML table is chosen based on its `prefix` field.
`prefix`
: A prefix of the user-specified image name, i.e. using one of the following formats:
- _host_[`:`_port_]
- _host_[`:`_port_]`/`_namespace_[`/`_namespace_…]
- _host_[`:`_port_]`/`_namespace_[`/`_namespace_…]`/`_repo_
- _host_[`:`_port_]`/`_namespace_[`/`_namespace_…]`/`_repo_(`:`_tag|`@`_digest_)
The user-specified image name must start with the specified `prefix` (and continue
with the appropriate separator) for a particular `[[registry]]` TOML table to be
considered; (only) the TOML table with the longest match is used.
As a special case, the `prefix` field can be missing; if so, it defaults to the value
of the `location` field (described below).
#### Per-namespace settings
`insecure`
: `true` or `false`.
By default, container runtimes require TLS when retrieving images from a registry.
If `insecure` is set to `true`, unencrypted HTTP as well as TLS connections with untrusted
certificates are allowed.
`blocked`
: `true` or `false`.
If `true`, pulling images with matching names is forbidden.
#### Remapping and mirroring registries
The user-specified image reference is, primarily, a "logical" image name, always used for naming
the image. By default, the image reference also directly specifies the registry and repository
to use, but the following options can be used to redirect the underlying accesses
to different registry servers or locations (e.g. to support configurations with no access to the
internet without having to change `Dockerfile`s, or to add redundancy).
`location`
: Accepts the same format as the `prefix` field, and specifies the physical location
of the `prefix`-rooted namespace.
By default, this equal to `prefix` (in which case `prefix` can be omitted and the
`[[registry]]` TOML table can only specify `location`).
Example: Given
```
prefix = "example.com/foo"
location = "internal-registry-for-example.net/bar"
```
requests for the image `example.com/foo/myimage:latest` will actually work with the
`internal-registry-for-example.net/bar/myimage:latest` image.
`mirror`
: An array of TOML tables specifying (possibly-partial) mirrors for the
`prefix`-rooted namespace.
The mirrors are attempted in the specified order; the first one that can be
contacted and contains the image will be used (and if none of the mirrors contains the image,
the primary location specified by the `registry.location` field, or using the unmodified
user-specified reference, is tried last).
Each TOML table in the `mirror` array can contain the following fields, with the same semantics
as if specified in the `[[registry]]` TOML table directly:
- `location`
- `insecure`
`mirror-by-digest-only`
: `true` or `false`.
If `true`, mirrors will only be used during pulling if the image reference includes a digest.
Referencing an image by digest ensures that the same is always used
(whereas referencing an image by a tag may cause different registries to return
different images if the tag mapping is out of sync).
Note that if this is `true`, images referenced by a tag will only use the primary
registry, failing if that registry is not accessible.
*Note*: Redirection and mirrors are currently processed only when reading images, not when pushing
to a registry; that may change in the future.
#### Short-Name Aliasing
The use of unqualified-search registries entails an ambiguity as it is
unclear from which registry a given image, referenced by a short name,
may be pulled from.
As mentioned in the note at the end of this man page, using short names is
subject to the risk of hitting squatted registry namespaces. If the
unqualified-search registries are set to `["registry1.com", "registry2.com"]`
an attacker may take over a namespace of registry1.com such that an image may
be pulled from registry1.com instead of the intended source registry2.com.
While it is highly recommended to always use fully-qualified image references,
existing deployments using short names may not be easily changed. To
circumvent the aforementioned ambiguity, so called short-name aliases can be
configured that point to a fully-qualified image
reference.
Short-name aliases can be configured in the `[aliases]` table in the form of
`"name"="value"` with the left-hand `name` being the short name (e.g., "image")
and the right-hand `value` being the fully-qualified image reference (e.g.,
"registry.com/namespace/image"). Note that neither "name" nor "value" can
include a tag or digest. Moreover, "name" must be a short name and hence
cannot include a registry domain or refer to localhost.
When pulling a short name, the configured aliases table will be used for
resolving the short name. If a matching alias is found, it will be used
without further consulting the unqualified-search registries list. If no
matching alias is found, the behavior can be controlled via the
`short-name-mode` option as described below.
Note that tags and digests are stripped off a user-specified short name for
alias resolution. Hence, "image", "image:tag" and "image@digest" all resolve
to the same alias (i.e., "image"). Stripped off tags and digests are later
appended to the resolved alias.
Further note that drop-in configuration files (see containers-registries.conf.d(5))
can override aliases in the specific loading order of the files. If the "value" of
an alias is empty (i.e., ""), the alias will be erased. However, a given
"name" may only be specified once in a single config file.
#### Short-Name Aliasing: Modes
The `short-name-mode` option supports three modes to control the behaviour of
short-name resolution.
* `enforcing`: If only one unqualified-search registry is set, use it as there
is no ambiguity. If there is more than one registry and the user program is
running in a terminal (i.e., stdout & stdin are a TTY), prompt the user to
select one of the specified search registries. If the program is not running
in a terminal, the ambiguity cannot be resolved which will lead to an error.
* `permissive`: Behaves as enforcing but does not lead to an error if the
program is not running in a terminal. Instead, fallback to using all
unqualified-search registries.
* `disabled`: Use all unqualified-search registries without prompting.
If `short-name-mode` is not specified at all or left empty, default to the
`permissive` mode. If the user-specified short name was not aliased already,
the `enforcing` and `permissive` mode if prompted, will record a new alias
after a successful pull. Note that the recorded alias will be written to
`/var/cache/containers/short-name-aliases.conf` for root to have a clear
separation between possibly human-edited registries.conf files and the
machine-generated `short-name-aliases-conf`. Note that `$HOME/.cache` is used
for rootless users. If an alias is specified in a
`registries.conf` file and also the machine-generated
`short-name-aliases.conf`, the `short-name-aliases.conf` file has precedence.
#### Normalization of docker.io references
The Docker Hub `docker.io` is handled in a special way: every push and pull
operation gets internally normalized with `/library` if no other specific
namespace is defined (for example on `docker.io/namespace/image`).
(Note that the above-described normalization happens to match the behavior of
Docker.)
This means that a pull of `docker.io/alpine` will be internally translated to
`docker.io/library/alpine`. A pull of `docker.io/user/alpine` will not be
rewritten because this is already the correct remote path.
Therefore, to remap or mirror the `docker.io` images in the (implied) `/library`
namespace (or that whole namespace), the prefix and location fields in this
configuration file must explicitly include that `/library` namespace. For
example `prefix = "docker.io/library/alpine"` and not `prefix =
"docker.io/alpine"`. The latter would match the `docker.io/alpine/*`
repositories but not the `docker.io/[library/]alpine` image).
### EXAMPLE
```
unqualified-search-registries = ["example.com"]
[[registry]]
prefix = "example.com/foo"
insecure = false
blocked = false
location = "internal-registry-for-example.com/bar"
[[registry.mirror]]
location = "example-mirror-0.local/mirror-for-foo"
[[registry.mirror]]
location = "example-mirror-1.local/mirrors/foo"
insecure = true
```
Given the above, a pull of `example.com/foo/image:latest` will try:
1. `example-mirror-0.local/mirror-for-foo/image:latest`
2. `example-mirror-1.local/mirrors/foo/image:latest`
3. `internal-registry-for-example.net/bar/image:latest`
in order, and use the first one that exists.
## VERSION 1 FORMAT - DEPRECATED
VERSION 1 format is still supported but it does not support
using registry mirrors, longest-prefix matches, or location rewriting.
The TOML format is used to build a simple list of registries under three
categories: `registries.search`, `registries.insecure`, and `registries.block`.
You can list multiple registries using a comma separated list.
Search registries are used when the caller of a container runtime does not fully specify the
container image that they want to execute. These registries are prepended onto the front
of the specified container image until the named image is found at a registry.
Note that insecure registries can be used for any registry, not just the registries listed
under search.
The `registries.insecure` and `registries.block` lists have the same meaning as the
`insecure` and `blocked` fields in the current version.
### EXAMPLE
The following example configuration defines two searchable registries, one
insecure registry, and two blocked registries.
```
[registries.search]
registries = ['registry1.com', 'registry2.com']
[registries.insecure]
registries = ['registry3.com']
[registries.block]
registries = ['registry.untrusted.com', 'registry.unsafe.com']
```
# NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES
We recommend always using fully qualified image names including the registry
server (full dns name), namespace, image name, and tag
(e.g., registry.redhat.io/ubi8/ubi:latest). When using short names, there is
always an inherent risk that the image being pulled could be spoofed. For
example, a user wants to pull an image named `foobar` from a registry and
expects it to come from myregistry.com. If myregistry.com is not first in the
search list, an attacker could place a different `foobar` image at a registry
earlier in the search list. The user would accidentally pull and run the
attacker's image and code rather than the intended content. We recommend only
adding registries which are completely trusted, i.e. registries which don't
allow unknown or anonymous users to create accounts with arbitrary names. This
will prevent an image from being spoofed, squatted or otherwise made insecure.
If it is necessary to use one of these registries, it should be added at the
end of the list.
It is recommended to use fully-qualified images for pulling as
the destination registry is unambiguous. Pulling by digest
(i.e., quay.io/repository/name@digest) further eliminates the ambiguity of
tags.
# SEE ALSO
containers-certs.d(5)
# HISTORY
Dec 2019, Warning added for unqualified image names by Tom Sweeney <tsweeney@redhat.com>
Mar 2019, Added additional configuration format by Sascha Grunert <sgrunert@suse.com>
Aug 2018, Renamed to containers-registries.conf(5) by Valentin Rothberg <vrothberg@suse.com>
Jun 2018, Updated by Tom Sweeney <tsweeney@redhat.com>
Aug 2017, Originally compiled by Brent Baude <bbaude@redhat.com>

View File

@ -0,0 +1,37 @@
% CONTAINERS-REGISTRIES.CONF.D(5)
% Valentin Rothberg
% Mar 2020
# NAME
containers-registries.conf.d - directory for drop-in registries.conf files
# DESCRIPTION
CONTAINERS-REGISTRIES.CONF.D is a system-wide directory for drop-in
configuration files in the `containers-registries.conf(5)` format.
By default, the directory is located at `/etc/containers/registries.conf.d`.
# CONFIGURATION PRECEDENCE
Once the main configuration at `/etc/containers/registries.conf` is loaded, the
files in `/etc/containers/registries.conf.d` are loaded in alpha-numerical
order. Then the conf files in `$HOME/.config/containers/registries.conf.d` are loaded in alpha-numerical order, if they exist. If the `$HOME/.config/containers/registries.conf` is loaded, only the conf files under `$HOME/.config/containers/registries.conf.d` are loaded in alpha-numerical order.
Specified fields in a conf file will overwrite any previous setting. Note
that only files with the `.conf` prefix are loaded, other files and
sub-directories are ignored.
For instance, setting the `unqualified-search-registries` in
`/etc/containers/registries.conf.d/myregistries.conf` will overwrite previous
settings in `/etc/containers/registries.conf`. The `[[registry]]` tables merged
by overwriting existing items if the prefixes are identical while new ones are
added.
All drop-in configuration files must be specified in the version 2 of the
`containers-registries.conf(5)` format.
# SEE ALSO
`containers-registries.conf(5)`
# HISTORY
Mar 2020, Originally compiled by Valentin Rothberg <rothberg@redhat.com>

View File

@ -0,0 +1,134 @@
% CONTAINERS-REGISTRIES.D(5) Registries.d Man Page
% Miloslav Trmač
% August 2016
# NAME
containers-registries.d - Directory for various registries configurations
# DESCRIPTION
The registries configuration directory contains configuration for various registries
(servers storing remote container images), and for content stored in them,
so that the configuration does not have to be provided in command-line options over and over for every command,
and so that it can be shared by all users of containers/image.
By default, the registries configuration directory is `$HOME/.config/containers/registries.d` if it exists, otherwise `/etc/containers/registries.d` (unless overridden at compile-time);
applications may allow using a different directory instead.
## Directory Structure
The directory may contain any number of files with the extension `.yaml`,
each using the YAML format. Other than the mandatory extension, names of the files
dont matter.
The contents of these files are merged together; to have a well-defined and easy to understand
behavior, there can be only one configuration section describing a single namespace within a registry
(in particular there can be at most one one `default-docker` section across all files,
and there can be at most one instance of any key under the `docker` section;
these sections are documented later).
Thus, it is forbidden to have two conflicting configurations for a single registry or scope,
and it is also forbidden to split a configuration for a single registry or scope across
more than one file (even if they are not semantically in conflict).
## Registries, Scopes and Search Order
Each YAML file must contain a “YAML mapping” (key-value pairs). Two top-level keys are defined:
- `default-docker` is the _configuration section_ (as documented below)
for registries implementing "Docker Registry HTTP API V2".
This key is optional.
- `docker` is a mapping, using individual registries implementing "Docker Registry HTTP API V2",
or namespaces and individual images within these registries, as keys;
the value assigned to any such key is a _configuration section_.
This key is optional.
Scopes matching individual images are named Docker references *in the fully expanded form*, either
using a tag or digest. For example, `docker.io/library/busybox:latest` (*not* `busybox:latest`).
More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest),
a repository namespace, or a registry host (and a port if it differs from the default).
Note that if a registry is accessed using a hostname+port configuration, the port-less hostname
is _not_ used as parent scope.
When searching for a configuration to apply for an individual container image, only
the configuration for the most-precisely matching scope is used; configuration using
more general scopes is ignored. For example, if _any_ configuration exists for
`docker.io/library/busybox`, the configuration for `docker.io` is ignored
(even if some element of the configuration is defined for `docker.io` and not for `docker.io/library/busybox`).
### Built-in Defaults
If no `docker` section can be found for the container image, and no `default-docker` section is configured,
the default directory, `/var/lib/containers/sigstore` for root and `$HOME/.local/share/containers/sigstore` for unprivileged user, will be used for reading and writing signatures.
## Individual Configuration Sections
A single configuration section is selected for a container image using the process
described above. The configuration section is a YAML mapping, with the following keys:
- `sigstore-staging` defines an URL of of the signature storage, used for editing it (adding or deleting signatures).
This key is optional; if it is missing, `sigstore` below is used.
- `sigstore` defines an URL of the signature storage.
This URL is used for reading existing signatures,
and if `sigstore-staging` does not exist, also for adding or removing them.
This key is optional; if it is missing, no signature storage is defined (no signatures
are download along with images, adding new signatures is possible only if `sigstore-staging` is defined).
## Examples
### Using Containers from Various Origins
The following demonstrates how to to consume and run images from various registries and namespaces:
```yaml
docker:
registry.database-supplier.com:
sigstore: https://sigstore.database-supplier.com
distribution.great-middleware.org:
sigstore: https://security-team.great-middleware.org/sigstore
docker.io/web-framework:
sigstore: https://sigstore.web-framework.io:8080
```
### Developing and Signing Containers, Staging Signatures
For developers in `example.com`:
- Consume most container images using the public servers also used by clients.
- Use a separate signature storage for an container images in a namespace corresponding to the developers' department, with a staging storage used before publishing signatures.
- Craft an individual exception for a single branch a specific developer is working on locally.
```yaml
docker:
registry.example.com:
sigstore: https://registry-sigstore.example.com
registry.example.com/mydepartment:
sigstore: https://sigstore.mydepartment.example.com
sigstore-staging: file:///mnt/mydepartment/sigstore-staging
registry.example.com/mydepartment/myproject:mybranch:
sigstore: http://localhost:4242/sigstore
sigstore-staging: file:///home/useraccount/webroot/sigstore
```
### A Global Default
If a company publishes its products using a different domain, and different registry hostname for each of them, it is still possible to use a single signature storage server
without listing each domain individually. This is expected to rarely happen, usually only for staging new signatures.
```yaml
default-docker:
sigstore-staging: file:///mnt/company/common-sigstore-staging
```
# AUTHORS
Miloslav Trmač <mitr@redhat.com>

View File

@ -0,0 +1,241 @@
% container-signature(5) Container signature format
% Miloslav Trmač
% March 2017
# Container signature format
This document describes the format of container signatures,
as implemented by the `github.com/containers/image/signature` package.
Most users should be able to consume these signatures by using the `github.com/containers/image/signature` package
(preferably through the higher-level `signature.PolicyContext` interface)
without having to care about the details of the format described below.
This documentation exists primarily for maintainers of the package
and to allow independent reimplementations.
## High-level overview
The signature provides an end-to-end authenticated claim that a container image
has been approved by a specific party (e.g. the creator of the image as their work,
an automated build system as a result of an automated build,
a company IT department approving the image for production) under a specified _identity_
(e.g. an OS base image / specific application, with a specific version).
A container signature consists of a cryptographic signature which identifies
and authenticates who signed the image, and carries as a signed payload a JSON document.
The JSON document identifies the image being signed, claims a specific identity of the
image and if applicable, contains other information about the image.
The signatures do not modify the container image (the layers, configuration, manifest, …);
e.g. their presence does not change the manifest digest used to identify the image in
docker/distribution servers; rather, the signatures are associated with an immutable image.
An image can have any number of signatures so signature distribution systems SHOULD support
associating more than one signature with an image.
## The cryptographic signature
As distributed, the container signature is a blob which contains a cryptographic signature
in an industry-standard format, carrying a signed JSON payload (i.e. the blob contains both the
JSON document and a signature of the JSON document; it is not a “detached signature” with
independent blobs containing the JSON document and a cryptographic signature).
Currently the only defined cryptographic signature format is an OpenPGP signature (RFC 4880),
but others may be added in the future. (The blob does not contain metadata identifying the
cryptographic signature format. It is expected that most formats are sufficiently self-describing
that this is not necessary and the configured expected public key provides another indication
of the expected cryptographic signature format. Such metadata may be added in the future for
newly added cryptographic signature formats, if necessary.)
Consumers of container signatures SHOULD verify the cryptographic signature
against one or more trusted public keys
(e.g. defined in a [policy.json signature verification policy file](containers-policy.json.5.md))
before parsing or processing the JSON payload in _any_ way,
in particular they SHOULD stop processing the container signature
if the cryptographic signature verification fails, without even starting to process the JSON payload.
(Consumers MAY extract identification of the signing key and other metadata from the cryptographic signature,
and the JSON payload, without verifying the signature, if the purpose is to allow managing the signature blobs,
e.g. to list the authors and image identities of signatures associated with a single container image;
if so, they SHOULD design the output of such processing to minimize the risk of users considering the output trusted
or in any way usable for making policy decisions about the image.)
### OpenPGP signature verification
When verifying a cryptographic signature in the OpenPGP format,
the consumer MUST verify at least the following aspects of the signature
(like the `github.com/containers/image/signature` package does):
- The blob MUST be a “Signed Message” as defined RFC 4880 section 11.3.
(e.g. it MUST NOT be an unsigned “Literal Message”, or any other non-signature format).
- The signature MUST have been made by an expected key trusted for the purpose (and the specific container image).
- The signature MUST be correctly formed and pass the cryptographic validation.
- The signature MUST correctly authenticate the included JSON payload
(in particular, the parsing of the JSON payload MUST NOT start before the complete payload has been cryptographically authenticated).
- The signature MUST NOT be expired.
The consumer SHOULD have tests for its verification code which verify that signatures failing any of the above are rejected.
## JSON processing and forward compatibility
The payload of the cryptographic signature is a JSON document (RFC 7159).
Consumers SHOULD parse it very strictly,
refusing any signature which violates the expected format (e.g. missing members, incorrect member types)
or can be interpreted ambiguously (e.g. a duplicated member in a JSON object).
Any violations of the JSON format or of other requirements in this document MAY be accepted if the JSON document can be recognized
to have been created by a known-incorrect implementation (see [`optional.creator`](#optionalcreator) below)
and if the semantics of the invalid document, as created by such an implementation, is clear.
The top-level value of the JSON document MUST be a JSON object with exactly two members, `critical` and `optional`,
each a JSON object.
The `critical` object MUST contain a `type` member identifying the document as a container signature
(as defined [below](#criticaltype))
and signature consumers MUST reject signatures which do not have this member or in which this member does not have the expected value.
To ensure forward compatibility (allowing older signature consumers to correctly
accept or reject signatures created at a later date, with possible extensions to this format),
consumers MUST reject the signature if the `critical` object, or _any_ of its subobjects,
contain _any_ member or data value which is unrecognized, unsupported, invalid, or in any other way unexpected.
At a minimum, this includes unrecognized members in a JSON object, or incorrect types of expected members.
For the same reason, consumers SHOULD accept any members with unrecognized names in the `optional` object,
and MAY accept signatures where the object member is recognized but unsupported, or the value of the member is unsupported.
Consumers still SHOULD reject signatures where a member of an `optional` object is supported but the value is recognized as invalid.
## JSON data format
An example of the full format follows, with detailed description below.
To reiterate, consumers of the signature SHOULD perform successful cryptographic verification,
and MUST reject unexpected data in the `critical` object, or in the top-level object, as described above.
```json
{
"critical": {
"type": "atomic container signature",
"image": {
"docker-manifest-digest": "sha256:817a12c32a39bbe394944ba49de563e085f1d3c5266eb8e9723256bc4448680e"
},
"identity": {
"docker-reference": "docker.io/library/busybox:latest"
}
},
"optional": {
"creator": "some software package v1.0.1-35",
"timestamp": 1483228800,
}
}
```
### `critical`
This MUST be a JSON object which contains data critical to correctly evaluating the validity of a signature.
Consumers MUST reject any signature where the `critical` object contains any unrecognized, unsupported, invalid or in any other way unexpected member or data.
### `critical.type`
This MUST be a string with a string value exactly equal to `atomic container signature` (three words, including the spaces).
Signature consumers MUST reject signatures which do not have this member or this member does not have exactly the expected value.
(The consumers MAY support signatures with a different value of the `type` member, if any is defined in the future;
if so, the rest of the JSON document is interpreted according to rules defining that value of `critical.type`,
not by this document.)
### `critical.image`
This MUST be a JSON object which identifies the container image this signature applies to.
Consumers MUST reject any signature where the `critical.image` object contains any unrecognized, unsupported, invalid or in any other way unexpected member or data.
(Currently only the `docker-manifest-digest` way of identifying a container image is defined;
alternatives to this may be defined in the future,
but existing consumers are required to reject signatures which use formats they do not support.)
### `critical.image.docker-manifest-digest`
This MUST be a JSON string, in the `github.com/opencontainers/go-digest.Digest` string format.
The value of this member MUST match the manifest of the signed container image, as implemented in the docker/distribution manifest addressing system.
The consumer of the signature SHOULD verify the manifest digest against a fully verified signature before processing the contents of the image manifest in any other way
(e.g. parsing the manifest further or downloading layers of the image).
Implementation notes:
* A single container image manifest may have several valid manifest digest values, using different algorithms.
* For “signed” [docker/distribution schema 1](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-1.md) manifests,
the manifest digest applies to the payload of the JSON web signature, not to the raw manifest blob.
### `critical.identity`
This MUST be a JSON object which identifies the claimed identity of the image (usually the purpose of the image, or the application, along with a version information),
as asserted by the author of the signature.
Consumers MUST reject any signature where the `critical.identity` object contains any unrecognized, unsupported, invalid or in any other way unexpected member or data.
(Currently only the `docker-reference` way of claiming an image identity/purpose is defined;
alternatives to this may be defined in the future,
but existing consumers are required to reject signatures which use formats they do not support.)
### `critical.identity.docker-reference`
This MUST be a JSON string, in the `github.com/docker/distribution/reference` string format,
and using the same normalization semantics (where e.g. `busybox:latest` is equivalent to `docker.io/library/busybox:latest`).
If the normalization semantics allows multiple string representations of the claimed identity with equivalent meaning,
the `critical.identity.docker-reference` member SHOULD use the fully explicit form (including the full host name and namespaces).
The value of this member MUST match the image identity/purpose expected by the consumer of the image signature and the image
(again, accounting for the `docker/distribution/reference` normalization semantics).
In the most common case, this means that the `critical.identity.docker-reference` value must be equal to the docker/distribution reference used to refer to or download the image.
However, depending on the specific application, users or system administrators may accept less specific matches
(e.g. ignoring the tag value in the signature when pulling the `:latest` tag or when referencing an image by digest),
or they may require `critical.identity.docker-reference` values with a completely different namespace to the reference used to refer to/download the image
(e.g. requiring a `critical.identity.docker-reference` value which identifies the image as coming from a supplier when fetching it from a company-internal mirror of approved images).
The software performing this verification SHOULD allow the users to define such a policy using the [policy.json signature verification policy file format](containers-policy.json.5.md).
The `critical.identity.docker-reference` value SHOULD contain either a tag or digest;
in most cases, it SHOULD use a tag rather than a digest. (See also the default [`matchRepoDigestOrExact` matching semantics in `policy.json`](containers-policy.json.5.md#signedby).)
### `optional`
This MUST be a JSON object.
Consumers SHOULD accept any members with unrecognized names in the `optional` object,
and MAY accept a signature where the object member is recognized but unsupported, or the value of the member is valid but unsupported.
Consumers still SHOULD reject any signature where a member of an `optional` object is supported but the value is recognized as invalid.
### `optional.creator`
If present, this MUST be a JSON string, identifying the name and version of the software which has created the signature.
The contents of this string is not defined in detail; however each implementation creating container signatures:
- SHOULD define the contents to unambiguously define the software in practice (e.g. it SHOULD contain the name of the software, not only the version number)
- SHOULD use a build and versioning process which ensures that the contents of this string (e.g. an included version number)
changes whenever the format or semantics of the generated signature changes in any way;
it SHOULD not be possible for two implementations which use a different format or semantics to have the same `optional.creator` value
- SHOULD use a format which is reasonably easy to parse in software (perhaps using a regexp),
and which makes it easy enough to recognize a range of versions of a specific implementation
(e.g. the version of the implementation SHOULD NOT be only a git hash, because they dont have an easily defined ordering;
the string should contain a version number, or at least a date of the commit).
Consumers of container signatures MAY recognize specific values or sets of values of `optional.creator`
(perhaps augmented with `optional.timestamp`),
and MAY change their processing of the signature based on these values
(usually to accommodate violations of this specification in past versions of the signing software which cannot be fixed retroactively),
as long as the semantics of the invalid document, as created by such an implementation, is clear.
If consumers of signatures do change their behavior based on the `optional.creator` value,
they SHOULD take care that the way they process the signatures is not inconsistent with
strictly validating signature consumers.
(I.e. it is acceptable for a consumer to accept a signature based on a specific `optional.creator` value
if other implementations would completely reject the signature,
but it would be very undesirable for the two kinds of implementations to accept the signature in different
and inconsistent situations.)
### `optional.timestamp`
If present, this MUST be a JSON number, which is representable as a 64-bit integer, and identifies the time when the signature was created
as the number of seconds since the UNIX epoch (Jan 1 1970 00:00 UTC).

View File

@ -1,16 +1,14 @@
% storage.conf(5) Container Storage Configuration File % containers-storage.conf(5) Container Storage Configuration File
% Dan Walsh % Dan Walsh
% May 2017 % May 2017
# NAME # NAME
storage.conf - Syntax of Container Storage configuration file storage.conf - Syntax of Container Storage configuration file
# DESCRIPTION ## DESCRIPTION
The STORAGE configuration file specifies all of the available container storage options The STORAGE configuration file specifies all of the available container storage options for tools using shared container storage, but in a TOML format that can be more easily modified and versioned.
for tools using shared container storage, but in a TOML format that can be more easily modified
and versioned.
# FORMAT ## FORMAT
The [TOML format][toml] is used as the encoding of the configuration file. The [TOML format][toml] is used as the encoding of the configuration file.
Every option and subtable listed here is nested under a global "storage" table. Every option and subtable listed here is nested under a global "storage" table.
No bare options are used. The format of TOML can be simplified to: No bare options are used. The format of TOML can be simplified to:
@ -28,17 +26,29 @@ No bare options are used. The format of TOML can be simplified to:
The `storage` table supports the following options: The `storage` table supports the following options:
**driver**=""
container storage driver
Default Copy On Write (COW) container storage driver. Valid drivers are "overlay", "vfs", "devmapper", "aufs", "btrfs", and "zfs". Some drivers (for example, "zfs", "btrfs", and "aufs") may not work if your kernel lacks support for the filesystem.
This field is requiered to guarantee proper operation.
**graphroot**="" **graphroot**=""
container storage graph dir (default: "/var/lib/containers/storage") container storage graph dir (default: "/var/lib/containers/storage")
Default directory to store all writable content created by container storage programs Default directory to store all writable content created by container storage programs.
The rootless graphroot path supports environment variable substitutions (ie. `$HOME/containers/storage`)
**rootless_storage_path**="$HOME/.local/share/containers/storage"
Storage path for rootless users. By default the graphroot for rootless users
is set to `$XDG_DATA_HOME/containers/storage`, if XDG_DATA_HOME is set.
Otherwise `$HOME/.local/share/containers/storage` is used. This field can
be used if administrators need to change the storage location for all users.
The rootless storage path supports environment variable substitutions (ie. `$HOME/containers/storage`)
A common use case for this field is to provide a local storage directory when user home directories are NFS-mounted (podman does not support container storage over NFS).
**runroot**="" **runroot**=""
container storage run dir (default: "/var/run/containers/storage") container storage run dir (default: "/run/containers/storage")
Default directory to store all temporary writable content created by container storage programs Default directory to store all temporary writable content created by container storage programs.
The rootless runroot path supports environment variable substitutions (ie. `$HOME/containers/storage`)
**driver**=""
container storage driver (default is "overlay")
Default Copy On Write (COW) container storage driver
### STORAGE OPTIONS TABLE ### STORAGE OPTIONS TABLE
@ -47,54 +57,79 @@ The `storage.options` table supports the following options:
**additionalimagestores**=[] **additionalimagestores**=[]
Paths to additional container image stores. Usually these are read/only and stored on remote network shares. Paths to additional container image stores. Usually these are read/only and stored on remote network shares.
**remap-uids=**""
**remap-gids=**""
Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they should appear inside of a container, to the UIDs/GIDs outside of the container, and the length of the range of UIDs/GIDs. Additional mapped sets can be listed and will be heeded by libraries, but there are limits to the number of mappings which the kernel will allow when you later attempt to run a container.
Example
remap-uids = 0:1668442479:65536
remap-gids = 0:1668442479:65536
These mappings tell the container engines to map UID 0 inside of the container to UID 1668442479 outside. UID 1 will be mapped to 1668442480. UID 2 will be mapped to 1668442481, etc, for the next 65533 UIDs in succession.
**remap-user**=""
**remap-group**=""
Remap-User/Group is a user name which can be used to look up one or more UID/GID ranges in the /etc/subuid or /etc/subgid file. Mappings are set up starting with an in-container ID of 0 and then a host-level ID taken from the lowest range that matches the specified name, and using the length of that range. Additional ranges are then assigned, using the ranges which specify the lowest host-level IDs first, to the lowest not-yet-mapped in-container ID, until all of the entries have been used for maps.
Example
remap-user = "containers"
remap-group = "containers"
**root-auto-userns-user**=""
Root-auto-userns-user is a user name which can be used to look up one or more UID/GID ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned to containers configured to create automatically a user namespace. Containers configured to automatically create a user namespace can still overlap with containers having an explicit mapping set. This setting is ignored when running as rootless.
**auto-userns-min-size**=1024
Auto-userns-min-size is the minimum size for a user namespace created automatically.
**auto-userns-max-size**=65536
Auto-userns-max-size is the maximum size for a user namespace created automatically.
### STORAGE OPTIONS FOR AUFS TABLE
The `storage.options.aufs` table supports the following options:
**mountopt**=""
Comma separated list of default options to be used to mount container images. Suggested value "nodev". Mount options are documented in the mount(8) man page.
### STORAGE OPTIONS FOR BTRFS TABLE
The `storage.options.btrfs` table supports the following options:
**min_space**=""
Specifies the min space in a btrfs volume.
**size**="" **size**=""
Maximum size of a container image. Default is 10GB. This flag can be used to set quota Maximum size of a container image. This flag can be used to set quota on the size of container images. (format: <number>[<unit>], where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
on the size of container images.
**override_kernel_check**="" ### STORAGE OPTIONS FOR THINPOOL (devicemapper) TABLE
Tell storage drivers to ignore kernel version checks. Some storage drivers assume that if a kernel is too
old, the driver is not supported. But for kernels that have had the drivers backported, this flag
allows users to override the checks
[storage.options.thinpool] The `storage.options.thinpool` table supports the following options for the `devicemapper` driver:
Storage Options for thinpool
The `storage.options.thinpool` table supports the following options:
**autoextend_percent**="" **autoextend_percent**=""
Tells the thinpool driver the amount by which the thinpool needs to be grown. This is specified in terms of % of pool size. So a value of 20 means that when threshold is hit, pool will be grown by 20% of existing pool size. (default: 20%)
Tells the thinpool driver the amount by which the thinpool needs to be grown. This is specified in terms of % of pool size. So a value of 20 means that when threshold is hit, pool will be grown by 20% of existing pool size. (Default is 20%)
**autoextend_threshold**="" **autoextend_threshold**=""
Tells the driver the thinpool extension threshold in terms of percentage of pool size. For example, if threshold is 60, that means when pool is 60% full, threshold has been hit. (default: 80%)
Tells the driver the thinpool extension threshold in terms of percentage of pool size. For example, if threshold is 60, that means when pool is 60% full, threshold has been hit. (80% is the default)
**basesize**="" **basesize**=""
Specifies the size to use when creating the base device, which limits the size of images and containers. (default: 10g)
Specifies the size to use when creating the base device, which limits the size of images and containers. (10g is the default)
**blocksize**="" **blocksize**=""
Specifies a custom blocksize to use for the thin pool. (default: 64k)
Specifies a custom blocksize to use for the thin pool. (64k is the default)
**directlvm_device**="" **directlvm_device**=""
Specifies a custom block storage device to use for the thin pool. Required for using graphdriver `devicemapper`.
Specifies a custom block storage device to use for the thin pool. Required if you setup devicemapper
**directlvm_device_force**="" **directlvm_device_force**=""
Tells driver to wipe device (directlvm_device) even if device already has a filesystem. (default: false)
Tells driver to wipe device (directlvm_device) even if device already has a filesystem. Default is False
**fs**="xfs" **fs**="xfs"
Specifies the filesystem type to use for the base device. (default: xfs)
Specifies the filesystem type to use for the base device. (Default is xfs)
**log_level**="" **log_level**=""
Sets the log level of devicemapper. Sets the log level of devicemapper.
0: LogLevelSuppress 0 (Default) 0: LogLevelSuppress 0 (default)
2: LogLevelFatal 2: LogLevelFatal
3: LogLevelErr 3: LogLevelErr
4: LogLevelWarn 4: LogLevelWarn
@ -102,30 +137,130 @@ Sets the log level of devicemapper.
6: LogLevelInfo 6: LogLevelInfo
7: LogLevelDebug 7: LogLevelDebug
**min_free_space**="" **metadata_size**=""
metadata_size is used to set the `pvcreate --metadatasize` options when creating thin devices. (Default 128k)
Specifies the min free space percent in a thin pool require for new device creation to succeed. Valid values are from 0% - 99%. Value 0% disables (10% is the default) **min_free_space**=""
Specifies the min free space percent in a thin pool required for new device creation to succeed. Valid values are from 0% - 99%. Value 0% disables. (default: 10%)
**mkfsarg**="" **mkfsarg**=""
Specifies extra mkfs arguments to be used when creating the base device. Specifies extra mkfs arguments to be used when creating the base device.
**mountopt**="" **mountopt**=""
Comma separated list of default options to be used to mount container images. Suggested value "nodev". Mount options are documented in the mount(8) man page.
Specifies extra mount options used when mounting the thin devices. **size**=""
Maximum size of a container image. This flag can be used to set quota on the size of container images. (format: <number>[<unit>], where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
**use_deferred_removal**=""
Marks device for deferred removal. If the device is in use when it driver attempts to remove it, driver will tell the kernel to remove it as soon as possible. (Default is true).
**use_deferred_deletion**="" **use_deferred_deletion**=""
Marks thinpool device for deferred deletion. If the thinpool is in use when the driver attempts to delete it, the driver will attempt to delete device every 30 seconds until successful, or when it restarts. Deferred deletion permanently deletes the device and all data stored in the device will be lost. (default: true).
Marks device for deferred deletion. If the device is in use when it driver attempts to delete it, driver continue to attempt to delete device every 30 seconds, or when it restarts. (Default is true). **use_deferred_removal**=""
Marks devicemapper block device for deferred removal. If the device is in use when its driver attempts to remove it, the driver tells the kernel to remove the device as soon as possible. Note this does not free up the disk space, use deferred deletion to fully remove the thinpool. (default: true).
**xfs_nospace_max_retries**="" **xfs_nospace_max_retries**=""
Specifies the maximum number of retries XFS should attempt to complete IO when ENOSPC (no space) error is returned by underlying storage device. (default: 0, which means to try continuously.)
Specifies the maximum number of retries XFS should attempt to complete IO when ENOSPC (no space) error is returned by underlying storage device. (Default is 0, which means to try continuously. ### STORAGE OPTIONS FOR OVERLAY TABLE
# HISTORY The `storage.options.overlay` table supports the following options:
**ignore_chown_errors** = "false"
ignore_chown_errors can be set to allow a non privileged user running with a single UID within a user namespace to run containers. The user can pull and use any image even those with multiple uids. Note multiple UIDs will be squashed down to the default uid in the container. These images will have no separation between the users in the container. (default: false)
**force_mask** = "0000|shared|private"
ForceMask specifies the permissions mask that is used for new files and
directories.
The values "shared" and "private" are accepted. (default: ""). Octal permission
masks are also accepted.
``: Not set
All files/directories, get set with the permissions identified within the
image.
`private`: it is equivalent to 0700.
All files/directories get set with 0700 permissions. The owner has rwx
access to the files. No other users on the system can access the files.
This setting could be used with networked based home directories.
`shared`: it is equivalent to 0755.
The owner has rwx access to the files and everyone else can read, access
and execute them. This setting is useful for sharing containers storage
with other users. For instance, a storage owned by root could be shared
to rootless users as an additional store.
NOTE: All files within the image are made readable and executable by any
user on the system. Even /etc/shadow within your image is now readable by
any user.
`OCTAL`: Users can experiment with other OCTAL Permissions.
Note: The force_mask Flag is an experimental feature, it could change in the
future. When "force_mask" is set the original permission mask is stored in the
"user.containers.override_stat" xattr and the "mount_program" option must be
specified. Mount programs like "/usr/bin/fuse-overlayfs" present the extended
attribute permissions to processes within containers rather then the
"force_mask" permissions.
**mount_program**=""
Specifies the path to a custom program to use instead of using kernel defaults
for mounting the file system. In rootless mode, without the CAP_SYS_ADMIN
capability, many kernels prevent mounting of overlay file systems, requiring
you to specify a mount_program. The mount_program option is also required on
systems where the underlying storage is btrfs, aufs, zfs, overlay, or ecryptfs
based file systems.
mount_program = "/usr/bin/fuse-overlayfs"
**mountopt**=""
Comma separated list of default options to be used to mount container images. Suggested value "nodev". Mount options are documented in the mount(8) man page.
**size**=""
Maximum size of a container image. This flag can be used to set quota on the size of container images. (format: <number>[<unit>], where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
### STORAGE OPTIONS FOR VFS TABLE
The `storage.options.vfs` table supports the following options:
**ignore_chown_errors** = "false"
ignore_chown_errors can be set to allow a non privileged user running with a single UID within a user namespace to run containers. The user can pull and use any image even those with multiple uids. Note multiple UIDs will be squashed down to the default uid in the container. These images will have no separation between the users in the container. (default: false)
### STORAGE OPTIONS FOR ZFS TABLE
The `storage.options.zfs` table supports the following options:
**fsname**=""
File System name for the zfs driver
**mountopt**=""
Comma separated list of default options to be used to mount container images. Suggested value "nodev". Mount options are documented in the mount(8) man page.
**skip_mount_home=""**
Tell storage drivers to not create a PRIVATE bind mount on their home directory.
**size**=""
Maximum size of a container image. This flag can be used to set quota on the size of container images. (format: <number>[<unit>], where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
## SELINUX LABELING
When running on an SELinux system, if you move the containers storage graphroot directory, you must make sure the labeling is correct.
Tell SELinux about the new containers storage by setting up an equivalence record. This tells SELinux to label content under the new path, as if it was stored under `/var/lib/containers/storage`.
```
semanage fcontext -a -e /var/lib/containers NEWSTORAGEPATH
restorecon -R -v NEWSTORAGEPATH
```
The semanage command above tells SELinux to setup the default labeling of `NEWSTORAGEPATH` to match `/var/lib/containers`. The `restorecon` command tells SELinux to apply the labels to the actual content.
Now all new content created in these directories will automatically be created with the correct label.
## SEE ALSO
`semanage(8)`, `restorecon(8)`, `mount(8)`, `fuse-overlayfs(1)`
## FILES
Distributions often provide a `/usr/share/containers/storage.conf` file to define default storage configuration. Administrators can override this file by creating `/etc/containers/storage.conf` to specify their own configuration. The storage.conf file for rootless users is stored in the `$XDG_CONFIG_HOME/containers/storage.conf` file. If `$XDG_CONFIG_HOME` is not set then the file `$HOME/.config/containers/storage.conf` is used.
## HISTORY
May 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com> May 2017, Originally compiled by Dan Walsh <dwalsh@redhat.com>
Format copied from crio.conf man page created by Aleksa Sarai <asarai@suse.de> Format copied from crio.conf man page created by Aleksa Sarai <asarai@suse.de>

View File

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

472
SOURCES/containers.conf Normal file
View File

@ -0,0 +1,472 @@
# The containers configuration file specifies all of the available configuration
# command-line options/flags for container engine tools like Podman & Buildah,
# but in a TOML format that can be easily modified and versioned.
# Please refer to containers.conf(5) for details of all configuration options.
# Not all container engines implement all of the options.
# All of the options have hard coded defaults and these options will override
# the built in defaults. Users can then override these options via the command
# line. Container engines will read containers.conf files in up to three
# locations in the following order:
# 1. /usr/share/containers/containers.conf
# 2. /etc/containers/containers.conf
# 3. $HOME/.config/containers/containers.conf (Rootless containers ONLY)
# Items specified in the latter containers.conf, if they exist, override the
# previous containers.conf settings, or the default settings.
[containers]
# List of devices. Specified as
# "<device-on-host>:<device-on-container>:<permissions>", for example:
# "/dev/sdc:/dev/xvdc:rwm".
# If it is empty or commented out, only the default devices will be used
#
# devices = []
# List of volumes. Specified as
# "<directory-on-host>:<directory-in-container>:<options>", for example:
# "/db:/var/lib/db:ro".
# If it is empty or commented out, no volumes will be added
#
# volumes = []
# Used to change the name of the default AppArmor profile of container engine.
#
# apparmor_profile = "container-default"
# List of annotation. Specified as
# "key=value"
# If it is empty or commented out, no annotations will be added
#
# annotations = []
# Default way to to create a cgroup namespace for the container
# Options are:
# `private` Create private Cgroup Namespace for the container.
# `host` Share host Cgroup Namespace with the container.
#
# cgroupns = "private"
# Control container cgroup configuration
# Determines whether the container will create CGroups.
# Options are:
# `enabled` Enable cgroup support within container
# `disabled` Disable cgroup support, will inherit cgroups from parent
# `no-conmon` Do not create a cgroup dedicated to conmon.
#
# cgroups = "enabled"
# List of default capabilities for containers. If it is empty or commented out,
# the default capabilities defined in the container engine will be added.
#
default_capabilities = [
"NET_RAW",
"CHOWN",
"DAC_OVERRIDE",
"FOWNER",
"FSETID",
"KILL",
"NET_BIND_SERVICE",
"SETFCAP",
"SETGID",
"SETPCAP",
"SETUID",
"SYS_CHROOT"
]
# A list of sysctls to be set in containers by default,
# specified as "name=value",
# for example:"net.ipv4.ping_group_range = 0 0".
#
default_sysctls = [
"net.ipv4.ping_group_range=0 0",
]
# A list of ulimits to be set in containers by default, specified as
# "<ulimit name>=<soft limit>:<hard limit>", for example:
# "nofile=1024:2048"
# See setrlimit(2) for a list of resource names.
# Any limit not specified here will be inherited from the process launching the
# container engine.
# Ulimits has limits for non privileged container engines.
#
# default_ulimits = [
# "nofile=1280:2560",
# ]
# List of default DNS options to be added to /etc/resolv.conf inside of the container.
#
# dns_options = []
# List of default DNS search domains to be added to /etc/resolv.conf inside of the container.
#
# dns_searches = []
# Set default DNS servers.
# This option can be used to override the DNS configuration passed to the
# container. The special value "none" can be specified to disable creation of
# /etc/resolv.conf in the container.
# The /etc/resolv.conf file in the image will be used without changes.
#
# dns_servers = []
# Environment variable list for the conmon process; used for passing necessary
# environment variables to conmon or the runtime.
#
# env = [
# "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
# "TERM=xterm",
# ]
# Pass all host environment variables into the container.
#
# env_host = false
# Default proxy environment variables passed into the container.
# The environment variables passed in include:
# http_proxy, https_proxy, ftp_proxy, no_proxy, and the upper case versions of
# these. This option is needed when host system uses a proxy but container
# should not use proxy. Proxy environment variables specified for the container
# in any other way will override the values passed from the host.
#
# http_proxy = true
# Run an init inside the container that forwards signals and reaps processes.
#
# init = false
# Container init binary, if init=true, this is the init binary to be used for containers.
#
# init_path = "/usr/libexec/podman/catatonit"
# Default way to to create an IPC namespace (POSIX SysV IPC) for the container
# Options are:
# `private` Create private IPC Namespace for the container.
# `host` Share host IPC Namespace with the container.
#
# ipcns = "private"
# keyring tells the container engine whether to create
# a kernel keyring for use within the container.
# keyring = true
# label tells the container engine whether to use container separation using
# MAC(SELinux) labeling or not.
# The label flag is ignored on label disabled systems.
#
# label = true
# Logging driver for the container. Available options: k8s-file and journald.
#
# log_driver = "k8s-file"
# Maximum size allowed for the container log file. Negative numbers indicate
# that no size limit is imposed. If positive, it must be >= 8192 to match or
# exceed conmon's read buffer. The file is truncated and re-opened so the
# limit is never exceeded.
#
# log_size_max = -1
# Default way to to create a Network namespace for the container
# Options are:
# `private` Create private Network Namespace for the container.
# `host` Share host Network Namespace with the container.
# `none` Containers do not use the network
#
# netns = "private"
# Create /etc/hosts for the container. By default, container engine manage
# /etc/hosts, automatically adding the container's own IP address.
#
# no_hosts = false
# Maximum number of processes allowed in a container.
#
# pids_limit = 2048
# Default way to to create a PID namespace for the container
# Options are:
# `private` Create private PID Namespace for the container.
# `host` Share host PID Namespace with the container.
#
# pidns = "private"
# Path to the seccomp.json profile which is used as the default seccomp profile
# for the runtime.
#
# seccomp_profile = "/usr/share/containers/seccomp.json"
# Size of /dev/shm. Specified as <number><unit>.
# Unit is optional, values:
# b (bytes), k (kilobytes), m (megabytes), or g (gigabytes).
# If the unit is omitted, the system uses bytes.
#
# shm_size = "65536k"
# Set timezone in container. Takes IANA timezones as well as "local",
# which sets the timezone in the container to match the host machine.
#
# tz = ""
# Set umask inside the container
#
# umask="0022"
# Default way to to create a UTS namespace for the container
# Options are:
# `private` Create private UTS Namespace for the container.
# `host` Share host UTS Namespace with the container.
#
# utsns = "private"
# Default way to to create a User namespace for the container
# Options are:
# `auto` Create unique User Namespace for the container.
# `host` Share host User Namespace with the container.
#
# userns = "host"
# Number of UIDs to allocate for the automatic container creation.
# UIDs are allocated from the "container" UIDs listed in
# /etc/subuid & /etc/subgid
#
# userns_size=65536
# The network table contains settings pertaining to the management of
# CNI plugins.
[network]
# Path to directory where CNI plugin binaries are located.
#
# cni_plugin_dirs = ["/usr/libexec/cni"]
# Path to the directory where CNI configuration files are located.
#
# network_config_dir = "/etc/cni/net.d/"
[engine]
# ImageBuildFormat indicates the default image format to building
# container images. Valid values are "oci" (default) or "docker".
# image_build_format = "oci"
# Cgroup management implementation used for the runtime.
# Valid options "systemd" or "cgroupfs"
#
# cgroup_manager = "systemd"
# Environment variables to pass into conmon
#
# conmon_env_vars = [
# "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# ]
# Paths to look for the conmon container manager binary
#
# conmon_path = [
# "/usr/libexec/podman/conmon",
# "/usr/local/libexec/podman/conmon",
# "/usr/local/lib/podman/conmon",
# "/usr/bin/conmon",
# "/usr/sbin/conmon",
# "/usr/local/bin/conmon",
# "/usr/local/sbin/conmon"
# ]
# Specify the keys sequence used to detach a container.
# Format is a single character [a-Z] or a comma separated sequence of
# `ctrl-<value>`, where `<value>` is one of:
# `a-z`, `@`, `^`, `[`, `\`, `]`, `^` or `_`
#
# detach_keys = "ctrl-p,ctrl-q"
# Determines whether engine will reserve ports on the host when they are
# forwarded to containers. When enabled, when ports are forwarded to containers,
# ports are held open by as long as the container is running, ensuring that
# they cannot be reused by other programs on the host. However, this can cause
# significant memory usage if a container has many ports forwarded to it.
# Disabling this can save memory.
#
# enable_port_reservation = true
# Environment variables to be used when running the container engine (e.g., Podman, Buildah).
# For example "http_proxy=internal.proxy.company.com".
# Note these environment variables will not be used within the container.
# Set the env section under [containers] table, if you want to set environment variables for the container.
# env = []
# Selects which logging mechanism to use for container engine events.
# Valid values are `journald`, `file` and `none`.
#
# events_logger = "journald"
events_logger = "file"
# Path to OCI hooks directories for automatically executed hooks.
#
# hooks_dir = [
# "/usr/share/containers/oci/hooks.d",
# ]
# Default transport method for pulling and pushing for images
#
# image_default_transport = "docker://"
# Default command to run the infra container
#
# infra_command = "/pause"
# Infra (pause) container image name for pod infra containers. When running a
# pod, we start a `pause` process in a container to hold open the namespaces
# associated with the pod. This container does nothing other then sleep,
# reserving the pods resources for the lifetime of the pod.
#
# infra_image = "k8s.gcr.io/pause:3.2"
infra_image = "registry.access.redhat.com/ubi8/pause"
# Specify the locking mechanism to use; valid values are "shm" and "file".
# Change the default only if you are sure of what you are doing, in general
# "file" is useful only on platforms where cgo is not available for using the
# faster "shm" lock type. You may need to run "podman system renumber" after
# you change the lock type.
#
# lock_type** = "shm"
# MultiImageArchive - if true, the container engine allows for storing archives
# (e.g., of the docker-archive transport) with multiple images. By default,
# Podman creates single-image archives.
#
# multi_image_archive = "false"
# Default engine namespace
# If engine is joined to a namespace, it will see only containers and pods
# that were created in the same namespace, and will create new containers and
# pods in that namespace.
# The default namespace is "", which corresponds to no namespace. When no
# namespace is set, all containers and pods are visible.
#
# namespace = ""
# Path to the slirp4netns binary
#
# network_cmd_path=""
# Default options to pass to the slirp4netns binary.
# For example "allow_host_loopback=true"
#
# network_cmd_options=[]
# Whether to use chroot instead of pivot_root in the runtime
#
# no_pivot_root = false
# Number of locks available for containers and pods.
# If this is changed, a lock renumber must be performed (e.g. with the
# 'podman system renumber' command).
#
# num_locks = 2048
# Whether to pull new image before running a container
# pull_policy = "missing"
# Indicates whether the application should be running in remote mode. This flag modifies the
# --remote option on container engines. Setting the flag to true will default
# `podman --remote=true` for access to the remote Podman service.
# remote = false
# Directory for persistent engine files (database, etc)
# By default, this will be configured relative to where the containers/storage
# stores containers
# Uncomment to change location from this default
#
# static_dir = "/var/lib/containers/storage/libpod"
# Directory for temporary files. Must be tmpfs (wiped after reboot)
#
# tmp_dir = "/run/libpod"
# Directory for libpod named volumes.
# By default, this will be configured relative to where containers/storage
# stores containers.
# Uncomment to change location from this default.
#
# volume_path = "/var/lib/containers/storage/volumes"
# Default OCI runtime
#
# runtime = "crun"
runtime = "runc"
# List of the OCI runtimes that support --format=json. When json is supported
# engine will use it for reporting nicer errors.
#
# runtime_supports_json = ["crun", "runc", "kata"]
# List of the OCI runtimes that supports running containers without cgroups.
#
# runtime_supports_nocgroups = ["crun"]
# List of the OCI runtimes that supports running containers with KVM Separation.
#
# runtime_supports_kvm = ["kata"]
# Number of seconds to wait for container to exit before sending kill signal.
# stop_timeout = 10
# Index to the active service
# active_service = production
# map of service destinations
# [service_destinations]
# [service_destinations.production]
# URI to access the Podman service
# Examples:
# rootless "unix://run/user/$UID/podman/podman.sock" (Default)
# rootfull "unix://run/podman/podman.sock (Default)
# remote rootless ssh://engineering.lab.company.com/run/user/1000/podman/podman.sock
# remote rootfull ssh://root@10.10.1.136:22/run/podman/podman.sock
# uri="ssh://user@production.example.com/run/user/1001/podman/podman.sock"
# Path to file containing ssh identity key
# identity = "~/.ssh/id_rsa"
# Paths to look for a valid OCI runtime (crun, runc, kata, etc)
[engine.runtimes]
# crun = [
# "/usr/bin/crun",
# "/usr/sbin/crun",
# "/usr/local/bin/crun",
# "/usr/local/sbin/crun",
# "/sbin/crun",
# "/bin/crun",
# "/run/current-system/sw/bin/crun",
# ]
# runc = [
# "/usr/bin/runc",
# "/usr/sbin/runc",
# "/usr/local/bin/runc",
# "/usr/local/sbin/runc",
# "/sbin/runc",
# "/bin/runc",
# "/usr/lib/cri-o-runc/sbin/runc",
# ]
# kata = [
# "/usr/bin/kata-runtime",
# "/usr/sbin/kata-runtime",
# "/usr/local/bin/kata-runtime",
# "/usr/local/sbin/kata-runtime",
# "/sbin/kata-runtime",
# "/bin/kata-runtime",
# "/usr/bin/kata-qemu",
# "/usr/bin/kata-fc",
# ]
[engine.volume_plugins]
# testplugin = "/run/podman/plugins/test.sock"
# The [engine.volume_plugins] table MUST be the last entry in this file.
# (Unless another table is added)
# TOML does not provide a way to end a table other than a further table being
# defined, so every key hereafter will be part of [volume_plugins] and not the
# main config.

View File

@ -0,0 +1,516 @@
% containers.conf(5) Container engine configuration file
# NAME
containers.conf - The container engine configuration file specifies default
configuration options and command-line flags for container engines.
# DESCRIPTION
Container engines like Podman & Buildah read containers.conf file, if it exists
and modify the defaults for running containers on the host. containers.conf uses
a TOML format that can be easily modified and versioned.
Container engines read the /usr/share/containers/containers.conf and
/etc/containers/containers.conf files if they exists. When running in rootless
mode, they also read $HOME/.config/containers/containers.conf files.
Fields specified in containers conf override the default options, as well as
options in previously read containers.conf files.
Not all options are supported in all container engines.
Note container engines also use other configuration files for configuring the environment.
* `storage.conf` for configuration of container and images storage.
* `registries.conf` for definition of container registires to search while pulling.
container images.
* `policy.conf` for controlling which images can be pulled to the system.
# FORMAT
The [TOML format][toml] is used as the encoding of the configuration file.
Every option is nested under its table. No bare options are used. The format of
TOML can be simplified to:
[table1]
option = value
[table2]
option = value
[table3]
option = value
[table3.subtable1]
option = value
## CONTAINERS TABLE
The containers table contains settings pertaining to the OCI runtime that can
configure and manage the OCI runtime.
**devices**=[]
List of devices.
Specified as 'device-on-host:device-on-container:permissions'.
Example: "/dev/sdc:/dev/xvdc:rwm".
**volumes**=[]
List of volumes.
Specified as "directory-on-host:directory-in-container:options".
Example: "/db:/var/lib/db:ro".
**apparmor_profile**="container-default"
Used to change the name of the default AppArmor profile of container engines.
The default profile name is "container-default".
**cgroupns**="private"
Default way to to create a cgroup namespace for the container.
Options are:
`private` Create private Cgroup Namespace for the container.
`host` Share host Cgroup Namespace with the container.
**cgroups**="enabled"
Determines whether the container will create CGroups.
Options are:
`enabled` Enable cgroup support within container
`disabled` Disable cgroup support, will inherit cgroups from parent
`no-conmon` Do not create a cgroup dedicated to conmon.
**default_capabilities**=[]
List of default capabilities for containers.
The default list is:
```
default_capabilities = [
"AUDIT_WRITE",
"CHOWN",
"DAC_OVERRIDE",
"FOWNER",
"FSETID",
"KILL",
"MKNOD",
"NET_BIND_SERVICE",
"NET_RAW",
"SETGID",
"SETPCAP",
"SETUID",
"SYS_CHROOT",
]
```
**default_sysctls**=[]
A list of sysctls to be set in containers by default,
specified as "name=value".
Example:"net.ipv4.ping_group_range=0 1000".
**default_ulimits**=[]
A list of ulimits to be set in containers by default,
specified as "name=soft-limit:hard-limit".
Example: "nofile=1024:2048".
**dns_options**=[]
List of default DNS options to be added to /etc/resolv.conf inside of the
container.
**dns_searches**=[]
List of default DNS search domains to be added to /etc/resolv.conf inside of
the container.
**dns_servers**=[]
A list of dns servers to override the DNS configuration passed to the
container. The special value “none” can be specified to disable creation of
/etc/resolv.conf in the container.
**env**=["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm"]
Environment variable list for the container process, used for passing
environment variables to the container.
**env_host**=false
Pass all host environment variables into the container.
**http_proxy**=true
Default proxy environment variables will be passed into the container.
The environment variables passed in include:
`http_proxy`, `https_proxy`, `ftp_proxy`, `no_proxy`, and the upper case
versions of these. The `no_proxy` option is needed when host system uses a proxy
but container should not use proxy. Proxy environment variables specified for
the container in any other way will override the values passed from the host.
**init**=false
Run an init inside the container that forwards signals and reaps processes.
**init_path**="/usr/libexec/podman/catatonit"
Path to the container-init binary, which forwards signals and reaps processes
within containers. Note that the container-init binary will only be used when
the `--init` for podman-create and podman-run is set.
**ipcns**="private"
Default way to to create a IPC namespace for the container.
Options are:
`private` Create private IPC Namespace for the container.
`host` Share host IPC Namespace with the container.
**keyring**=true
Indicates whether the container engines create a kernel keyring for use within
the container.
**label**=true
Indicates whether the container engine uses MAC(SELinux) container separation via labeling. This option is ignored on disabled systems.
**log_driver**="k8s-file"
Logging driver for the container. Available options: `k8s-file` and `journald`.
**log_size_max**=-1
Maximum size allowed for the container's log file. Negative numbers indicate
that no size limit is imposed. If it is positive, it must be >= 8192 to
match/exceed conmon's read buffer. The file is truncated and re-opened so the
limit is never exceeded.
**netns**="private"
Default way to to create a NET namespace for the container.
Options are:
`private` Create private NET Namespace for the container.
`host` Share host NET Namespace with the container.
`none` Containers do not use the network.
**no_hosts**=false
Create /etc/hosts for the container. By default, container engines manage
/etc/hosts, automatically adding the container's own IP address.
**pids_limit**=1024
Maximum number of processes allowed in a container. 0 indicates that no limit
is imposed.
**pidns**="private"
Default way to to create a PID namespace for the container.
Options are:
`private` Create private PID Namespace for the container.
`host` Share host PID Namespace with the container.
**seccomp_profile**="/usr/share/containers/seccomp.json"
Path to the seccomp.json profile which is used as the default seccomp profile
for the runtime.
**shm_size**="65536k"
Size of `/dev/shm`. The format is `<number><unit>`. `number` must be greater
than `0`.
Unit is optional and can be:
`b` (bytes), `k` (kilobytes), `m`(megabytes), or `g` (gigabytes).
If you omit the unit, the system uses bytes. If you omit the size entirely,
the system uses `65536k`.
**tz=**""
Set timezone in container. Takes IANA timezones as well as `local`, which sets the timezone in the container to match the host machine.
If not set, then containers will run with the time zone specified in the image.
Examples:
`tz="local"`
`tz="America/New_York"`
**umask**="0022"
Sets umask inside the container.
**utsns**="private"
Default way to to create a UTS namespace for the container.
Options are:
`private` Create private UTS Namespace for the container.
`host` Share host UTS Namespace with the container.
**userns**="host"
Default way to to create a USER namespace for the container.
Options are:
`private` Create private USER Namespace for the container.
`host` Share host USER Namespace with the container.
**userns_size**=65536
Number of UIDs to allocate for the automatic container creation. UIDs are
allocated from the “container” UIDs listed in /etc/subuid & /etc/subgid.
## NETWORK TABLE
The `network` table contains settings pertaining to the management of CNI
plugins.
**cni_plugin_dirs**=["/opt/cni/bin/",]
List of paths to directories where CNI plugin binaries are located.
**default_network**="podman"
The network name of the default CNI network to attach pods to.
**network_config_dir**="/etc/cni/net.d/"
Path to the directory where CNI configuration files are located.
## ENGINE TABLE
The `engine` table contains configuration options used to set up container engines such as Podman and Buildah.
**image_build_format**="oci"
The default image format to building container images. Valid values are "oci" (default) or "docker".
**cgroup_check**=false
CgroupCheck indicates the configuration has been rewritten after an upgrade to Fedora 31 to change the default OCI runtime for cgroupsv2.
**cgroup_manager**="systemd"
The cgroup management implementation used for the runtime. Supports `cgroupfs`
and `systemd`.
**conmon_env_vars**=[]
Environment variables to pass into Conmon.
**conmon_path**=[]
Paths to search for the conmon container manager binary. If the paths are
empty or no valid path was found, then the `$PATH` environment variable will be
used as the fallback.
The default list is:
```
conmon_path=[
"/usr/libexec/podman/conmon",
"/usr/local/libexec/podman/conmon",
"/usr/local/lib/podman/conmon",
"/usr/bin/conmon",
"/usr/sbin/conmon",
"/usr/local/bin/conmon",
"/usr/local/sbin/conmon",
"/run/current-system/sw/bin/conmon",
]
```
**detach_keys**="ctrl-p,ctrl-q"
Keys sequence used for detaching a container.
Specify the keys sequence used to detach a container.
Format is a single character `[a-Z]` or a comma separated sequence of
`ctrl-<value>`, where `<value>` is one of:
`a-z`, `@`, `^`, `[`, `\`, `]`, `^` or `_`
**enable_port_reservation**=true
Determines whether the engine will reserve ports on the host when they are
forwarded to containers. When enabled, when ports are forwarded to containers,
they are held open by conmon as long as the container is running, ensuring that
they cannot be reused by other programs on the host. However, this can cause
significant memory usage if a container has many ports forwarded to it.
Disabling this can save memory.
**env**=[]
Environment variables to be used when running the container engine (e.g., Podman, Buildah). For example "http_proxy=internal.proxy.company.com".
Note these environment variables will not be used within the container. Set the env section under [containers] table,
if you want to set environment variables for the container.
**events_logger**="journald"
Default method to use when logging events.
Valid values: `file`, `journald`, and `none`.
**hooks_dir**=["/etc/containers/oci/hooks.d", ...]
Path to the OCI hooks directories for automatically executed hooks.
**image_default_transport**="docker://"
Default transport method for pulling and pushing images.
**infra_command**="/pause"
Command to run the infra container.
**infra_image**="k8s.gcr.io/pause:3.2"
Infra (pause) container image name for pod infra containers. When running a
pod, we start a `pause` process in a container to hold open the namespaces
associated with the pod. This container does nothing other then sleep,
reserving the pods resources for the lifetime of the pod.
**lock_type**="shm"
Specify the locking mechanism to use; valid values are "shm" and "file".
Change the default only if you are sure of what you are doing, in general
"file" is useful only on platforms where cgo is not available for using the
faster "shm" lock type. You may need to run "podman system renumber" after you
change the lock type.
**multi_image_archive**=false
Allows for creating archives (e.g., tarballs) with more than one image. Some container engines, such as Podman, interpret additional arguments as tags for one image and hence do not store more than one image. The default behavior can be altered with this option.
**namespace**=""
Default engine namespace. If the engine is joined to a namespace, it will see
only containers and pods that were created in the same namespace, and will
create new containers and pods in that namespace. The default namespace is "",
which corresponds to no namespace. When no namespace is set, all containers
and pods are visible.
**network_cmd_path**=""
Path to the slirp4netns binary.
**network_cmd_options**=[]
Default options to pass to the slirp4netns binary.
Example "allow_host_loopback=true"
**no_pivot_root**=false
Whether to use chroot instead of pivot_root in the runtime.
**num_locks**=2048
Number of locks available for containers and pods. Each created container or
pod consumes one lock. The default number available is 2048. If this is
changed, a lock renumbering must be performed, using the
`podman system renumber` command.
**active_service**=""
Name of destination for accessing the Podman service.
**[service_destinations]**
**[service_destinations.{name}]**
**uri="ssh://user@production.example.com/run/user/1001/podman/podman.sock"**
Example URIs:
- **rootless local** - unix://run/user/1000/podman/podman.sock
- **rootless remote** - ssh://user@engineering.lab.company.com/run/user/1000/podman/podman.sock
- **rootfull local** - unix://run/podman/podman.sock
- **rootfull remote** - ssh://root@10.10.1.136:22/run/podman/podman.sock
**identity="~/.ssh/id_rsa**
Path to file containing ssh identity key
**pull_policy**="always"|"missing"|"never"
Pull image before running or creating a container. The default is **missing**.
- **missing**: attempt to pull the latest image from the registries listed in registries.conf if a local image does not exist. Raise an error if the image is not in any listed registry and is not present locally.
- **always**: pull the image from the first registry it is found in as listed in registries.conf. Raise an error if not found in the registries, even if the image is present locally.
- **never**: do not pull the image from the registry, use only the local version. Raise an error if the image is not present locally.
**remote** = false
Indicates whether the application should be running in remote mode. This flag modifies the
--remote option on container engines. Setting the flag to true will default `podman --remote=true` for access to the remote Podman service.
**runtime**=""
Default OCI specific runtime in runtimes that will be used by default. Must
refer to a member of the runtimes table. Default runtime will be searched for
on the system using the priority: "crun", "runc", "kata".
**runtime_supports_json**=["crun", "runc", "kata"]
The list of the OCI runtimes that support `--format=json`.
**runtime_supports_nocgroups**=["crun"]
The list of OCI runtimes that support running containers without CGroups.
**runtime_supports_kvm**=["kata"]
The list of OCI runtimes that support running containers with KVM separation.
**static_dir**="/var/lib/containers/storage/libpod"
Directory for persistent libpod files (database, etc).
By default this will be configured relative to where containers/storage
stores containers.
**stop_timeout**=10
Number of seconds to wait for container to exit before sending kill signal.
**tmp_dir**="/run/libpod"
The path to a temporary directory to store per-boot container.
Must be a tmpfs (wiped after reboot).
**volume_path**="/var/lib/containers/storage/volumes"
Directory where named volumes will be created in using the default volume
driver.
By default this will be configured relative to where containers/storage store
containers. This convention is followed by the default volume driver, but may
not be by other drivers.
**[engine.volume_plugins]**
A table of all the enabled volume plugins on the system. Volume plugins can be
used as the backend for Podman named volumes. Individual plugins are specified
below, as a map of the plugin name (what the plugin will be called) to its path
(filepath of the plugin's unix socket).
# FILES
**containers.conf**
Distributions often provide a `/usr/share/containers/containers.conf` file to
define default container configuration. Administrators can override fields in
this file by creating `/etc/containers/containers.conf` to specify their own
configuration. Rootless users can further override fields in the config by
creating a config file stored in the
`$HOME/.config/containers/containers.conf` file.
If the `CONTAINERS_CONF` path environment variable is set, just
this path will be used. This is primarily used for testing.
Fields specified in the containers.conf file override the default options, as
well as options in previously read containers.conf files.
**storage.conf**
The `/etc/containers/storage.conf` file is the default storage configuration file.
Rootless users can override fields in the storage config by creating
`$HOME/.config/containers/storage.conf`.
If the `CONTAINERS_STORAGE_CONF` path environment variable is set, this path
is used for the storage.conf file rather than the default.
This is primarily used for testing.
# SEE ALSO
containers-storage.conf(5), containers-policy.json(5), containers-registries.conf(5)
[toml]: https://github.com/toml-lang/toml

View File

@ -1,25 +1,113 @@
# This is a system-wide configuration file used to # For more information on this configuration file, see containers-registries.conf(5).
# keep track of registries for various container backends. #
# It adheres to TOML format and does not support recursive # There are multiple versions of the configuration syntax available, where the
# lists of registries. # second iteration is backwards compatible to the first one. Mixing up both
# formats will result in an runtime error.
#
# The initial configuration format looks like this:
#
# NOTE: RISK OF USING UNQUALIFIED IMAGE NAMES
# Red Hat recommends always using fully qualified image names including the registry server (full dns name),
# namespace, image name, and tag (ex. registry.redhat.io/ubi8/ubu:latest). When using short names, there is
# always an inherent risk that the image being pulled could be spoofed. For example, a user wants to.
# pull an image named `foobar` from a registry and expects it to come from myregistry.com. If myregistry.com
# is not first in the search list, an attacker could place a different `foobar` image at a registry earlier
# in the search list. The user would accidentally pull and run the attacker's image and code rather than the
# intended content. Red Hat recommends only adding registries which are completely trusted, i.e. registries
# which don't allow unknown or anonymous users to create accounts with arbitrary names. This will prevent
# an image from being spoofed, squatted or otherwise made insecure. If it is necessary to use one of these
# registries, it should be added at the end of the list.
#
# It is recommended to use fully-qualified images for pulling as the
# destination registry is unambiguous. Pulling by digest
# (i.e., quay.io/repository/name@digest) further eliminates the ambiguity of
# tags.
# The default location for this configuration file is /etc/containers/registries.conf. # The following registries are a set of secure defaults provided by Red Hat.
# Each of these registries provides container images curated, patched
# The only valid categories are: 'registries.search', 'registries.insecure', # and maintained by Red Hat and its partners
# and 'registries.block'. #[registries.search]
#registries = ['registry.access.redhat.com', 'registry.redhat.io']
# To ensure compatibility with docker we've included docker.io in the default search list. However Red Hat
# does not curate, patch or maintain container images from the docker.io registry.
[registries.search] [registries.search]
registries = ['registry.redhat.io', 'quay.io', 'docker.io'] registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io']
# If you need to access insecure registries, add the registry's fully-qualified name. # The following registries entry can be used for convenience but includes
# An insecure registry is one that does not have a valid SSL certificate or only does HTTP. # container images built by the community. This set of content comes with all
# of the risks of any user generated content including security and performance
# issues. To use this list first comment out the default list, then uncomment
# the following list
#[registries.search]
#registries = ['registry.access.redhat.com', 'registry.redhat.io', 'docker.io', 'quay.io']
# Registries that do not use TLS when pulling images or uses self-signed
# certificates.
[registries.insecure] [registries.insecure]
registries = [] registries = []
# Blocked Registries, blocks the `docker daemon` from pulling from the blocked registry. If you specify
# If you need to block pull access from a registry, uncomment the section below # "*", then the docker daemon will only be allowed to pull from registries listed above in the search
# and add the registries fully-qualified name. # registries. Blocked Registries is deprecated because other container runtimes and tools will not use it.
# # It is recommended that you use the trust policy file /etc/containers/policy.json to control which
# Docker only # registries you want to allow users to pull and push from. policy.json gives greater flexibility, and
# supports all container runtimes and tools including the docker daemon, cri-o, buildah ...
# The atomic CLI `atomic trust` can be used to easily configure the policy.json file.
[registries.block] [registries.block]
registries = [] registries = []
# The second version of the configuration format allows to specify registry
# mirrors:
#
# # An array of host[:port] registries to try when pulling an unqualified image, in order.
unqualified-search-registries = ["registry.fedoraproject.org", "registry.access.redhat.com", "registry.centos.org", "docker.io"]
#
# [[registry]]
# # The "prefix" field is used to choose the relevant [[registry]] TOML table;
# # (only) the TOML table with the longest match for the input image name
# # (taking into account namespace/repo/tag/digest separators) is used.
# #
# # If the prefix field is missing, it defaults to be the same as the "location" field.
# prefix = "example.com/foo"
#
# # If true, unencrypted HTTP as well as TLS connections with untrusted
# # certificates are allowed.
# insecure = false
#
# # If true, pulling images with matching names is forbidden.
# blocked = false
#
# # The physical location of the "prefix"-rooted namespace.
# #
# # By default, this equal to "prefix" (in which case "prefix" can be omitted
# # and the [[registry]] TOML table can only specify "location").
# #
# # Example: Given
# # prefix = "example.com/foo"
# # location = "internal-registry-for-example.net/bar"
# # requests for the image example.com/foo/myimage:latest will actually work with the
# # internal-registry-for-example.net/bar/myimage:latest image.
# location = internal-registry-for-example.com/bar"
#
# # (Possibly-partial) mirrors for the "prefix"-rooted namespace.
# #
# # The mirrors are attempted in the specified order; the first one that can be
# # contacted and contains the image will be used (and if none of the mirrors contains the image,
# # the primary location specified by the "registry.location" field, or using the unmodified
# # user-specified reference, is tried last).
# #
# # Each TOML table in the "mirror" array can contain the following fields, with the same semantics
# # as if specified in the [[registry]] TOML table directly:
# # - location
# # - insecure
# [[registry.mirror]]
# location = "example-mirror-0.local/mirror-for-foo"
# [[registry.mirror]]
# location = "example-mirror-1.local/mirrors/foo"
# insecure = true
# # Given the above, a pull of example.com/foo/image:latest will try:
# # 1. example-mirror-0.local/mirror-for-foo/image:latest
# # 2. example-mirror-1.local/mirrors/foo/image:latest
# # 3. internal-registry-for-example.net/bar/myimage:latest
# # in order, and use the first one that exists.

View File

@ -1,41 +0,0 @@
% registries.conf(5) System-wide registry configuration file
% Brent Baude
% Aug 2017
# NAME
registries.conf - Syntax of System Registry Configuration File
# DESCRIPTION
The REGISTRIES configuration file is a system-wide configuration file for container image
registries. The file format is TOML.
# FORMAT
The TOML_format is used to build simple list format for registries under two
categories: `search` and `insecure`. You can list multiple registries using
as a comma separated list.
Search registries are used when the caller of a container runtime does not fully specify the
container image that they want to execute. These registries are prepended onto the front
of the specified container image until the named image is found at a registry.
Insecure Registries. By default container runtimes use TLS when retrieving images
from a registry. If the registry is not setup with TLS, then the container runtime
will fail to pull images from the registry. If you add the registry to the list of
insecure registries then the container runtime will attempt use standard web protocols to
pull the image. It also allows you to pull from a registry with self-signed certificates.
Note insecure registries can be used for any registry, not just the
registries listed under search.
The following example configuration defines two searchable registries and one
insecure registry.
```
[registries.search]
registries = ["registry1.com", "registry2.com"]
[registries.insecure]
registries = ["registry3.com"]
```
# HISTORY
Aug 2017, Originally compiled by Brent Baude <bbaude@redhat.com>

1603
SOURCES/rhel-shortnames.conf Normal file

File diff suppressed because it is too large Load Diff

View File

@ -52,6 +52,8 @@
"syscalls": [ "syscalls": [
{ {
"names": [ "names": [
"_llseek",
"_newselect",
"accept", "accept",
"accept4", "accept4",
"access", "access",
@ -65,10 +67,17 @@
"chmod", "chmod",
"chown", "chown",
"chown32", "chown32",
"clock_adjtime",
"clock_adjtime64",
"clock_getres", "clock_getres",
"clock_getres_time64",
"clock_gettime", "clock_gettime",
"clock_gettime64",
"clock_nanosleep", "clock_nanosleep",
"clock_nanosleep_time64",
"clone",
"close", "close",
"close_range",
"connect", "connect",
"copy_file_range", "copy_file_range",
"creat", "creat",
@ -80,6 +89,7 @@
"epoll_ctl", "epoll_ctl",
"epoll_ctl_old", "epoll_ctl_old",
"epoll_pwait", "epoll_pwait",
"epoll_pwait2",
"epoll_wait", "epoll_wait",
"epoll_wait_old", "epoll_wait_old",
"eventfd", "eventfd",
@ -89,6 +99,7 @@
"exit", "exit",
"exit_group", "exit_group",
"faccessat", "faccessat",
"faccessat2",
"fadvise64", "fadvise64",
"fadvise64_64", "fadvise64_64",
"fallocate", "fallocate",
@ -107,7 +118,11 @@
"flock", "flock",
"fork", "fork",
"fremovexattr", "fremovexattr",
"fsconfig",
"fsetxattr", "fsetxattr",
"fsmount",
"fsopen",
"fspick",
"fstat", "fstat",
"fstat64", "fstat64",
"fstatat64", "fstatat64",
@ -118,6 +133,8 @@
"ftruncate64", "ftruncate64",
"futex", "futex",
"futimesat", "futimesat",
"get_robust_list",
"get_thread_area",
"getcpu", "getcpu",
"getcwd", "getcwd",
"getdents", "getdents",
@ -143,12 +160,10 @@
"getresuid", "getresuid",
"getresuid32", "getresuid32",
"getrlimit", "getrlimit",
"get_robust_list",
"getrusage", "getrusage",
"getsid", "getsid",
"getsockname", "getsockname",
"getsockopt", "getsockopt",
"get_thread_area",
"gettid", "gettid",
"gettimeofday", "gettimeofday",
"getuid", "getuid",
@ -159,14 +174,15 @@
"inotify_init1", "inotify_init1",
"inotify_rm_watch", "inotify_rm_watch",
"io_cancel", "io_cancel",
"ioctl",
"io_destroy", "io_destroy",
"io_getevents", "io_getevents",
"ioprio_get",
"ioprio_set",
"io_setup", "io_setup",
"io_submit", "io_submit",
"ioctl",
"ioprio_get",
"ioprio_set",
"ipc", "ipc",
"keyctl",
"kill", "kill",
"lchown", "lchown",
"lchown32", "lchown32",
@ -176,7 +192,6 @@
"listen", "listen",
"listxattr", "listxattr",
"llistxattr", "llistxattr",
"_llseek",
"lremovexattr", "lremovexattr",
"lseek", "lseek",
"lsetxattr", "lsetxattr",
@ -194,6 +209,8 @@
"mlockall", "mlockall",
"mmap", "mmap",
"mmap2", "mmap2",
"mount",
"move_mount",
"mprotect", "mprotect",
"mq_getsetattr", "mq_getsetattr",
"mq_notify", "mq_notify",
@ -210,22 +227,30 @@
"munlock", "munlock",
"munlockall", "munlockall",
"munmap", "munmap",
"name_to_handle_at",
"nanosleep", "nanosleep",
"newfstatat", "newfstatat",
"_newselect",
"open", "open",
"openat", "openat",
"openat2",
"open_tree",
"pause", "pause",
"pidfd_getfd",
"pidfd_open",
"pidfd_send_signal",
"pipe", "pipe",
"pipe2", "pipe2",
"pivot_root",
"poll", "poll",
"ppoll", "ppoll",
"ppoll_time64",
"prctl", "prctl",
"pread64", "pread64",
"preadv", "preadv",
"preadv2", "preadv2",
"prlimit64", "prlimit64",
"pselect6", "pselect6",
"pselect6_time64",
"pwrite64", "pwrite64",
"pwritev", "pwritev",
"pwritev2", "pwritev2",
@ -234,6 +259,7 @@
"readlink", "readlink",
"readlinkat", "readlinkat",
"readv", "readv",
"reboot",
"recv", "recv",
"recvfrom", "recvfrom",
"recvmmsg", "recvmmsg",
@ -253,11 +279,11 @@
"rt_sigsuspend", "rt_sigsuspend",
"rt_sigtimedwait", "rt_sigtimedwait",
"rt_tgsigqueueinfo", "rt_tgsigqueueinfo",
"sched_get_priority_max",
"sched_get_priority_min",
"sched_getaffinity", "sched_getaffinity",
"sched_getattr", "sched_getattr",
"sched_getparam", "sched_getparam",
"sched_get_priority_max",
"sched_get_priority_min",
"sched_getscheduler", "sched_getscheduler",
"sched_rr_get_interval", "sched_rr_get_interval",
"sched_setaffinity", "sched_setaffinity",
@ -277,6 +303,9 @@
"sendmmsg", "sendmmsg",
"sendmsg", "sendmsg",
"sendto", "sendto",
"set_robust_list",
"set_thread_area",
"set_tid_address",
"setfsgid", "setfsgid",
"setfsgid32", "setfsgid32",
"setfsuid", "setfsuid",
@ -297,11 +326,8 @@
"setreuid", "setreuid",
"setreuid32", "setreuid32",
"setrlimit", "setrlimit",
"set_robust_list",
"setsid", "setsid",
"setsockopt", "setsockopt",
"set_thread_area",
"set_tid_address",
"setuid", "setuid",
"setuid32", "setuid32",
"setxattr", "setxattr",
@ -335,36 +361,37 @@
"time", "time",
"timer_create", "timer_create",
"timer_delete", "timer_delete",
"timerfd_create",
"timerfd_gettime",
"timerfd_settime",
"timer_getoverrun", "timer_getoverrun",
"timer_gettime", "timer_gettime",
"timer_gettime64",
"timer_settime", "timer_settime",
"timerfd_create",
"timerfd_gettime",
"timerfd_gettime64",
"timerfd_settime",
"timerfd_settime64",
"times", "times",
"tkill", "tkill",
"truncate", "truncate",
"truncate64", "truncate64",
"ugetrlimit", "ugetrlimit",
"umask", "umask",
"umount",
"umount2",
"uname", "uname",
"unlink", "unlink",
"unlinkat", "unlinkat",
"unshare",
"utime", "utime",
"utimensat", "utimensat",
"utimensat_time64",
"utimes", "utimes",
"vfork", "vfork",
"vmsplice",
"wait4", "wait4",
"waitid", "waitid",
"waitpid", "waitpid",
"write", "write",
"writev", "writev"
"mount",
"umount2",
"reboot",
"name_to_handle_at",
"unshare"
], ],
"action": "SCMP_ACT_ALLOW", "action": "SCMP_ACT_ALLOW",
"args": [], "args": [],
@ -710,6 +737,7 @@
{ {
"names": [ "names": [
"kcmp", "kcmp",
"process_madvise",
"process_vm_readv", "process_vm_readv",
"process_vm_writev", "process_vm_writev",
"ptrace" "ptrace"
@ -743,7 +771,8 @@
"names": [ "names": [
"settimeofday", "settimeofday",
"stime", "stime",
"clock_settime" "clock_settime",
"clock_settime64"
], ],
"action": "SCMP_ACT_ALLOW", "action": "SCMP_ACT_ALLOW",
"args": [], "args": [],
@ -768,6 +797,111 @@
] ]
}, },
"excludes": {} "excludes": {}
},
{
"names": [
"socket"
],
"action": "SCMP_ACT_ERRNO",
"args": [
{
"index": 0,
"value": 16,
"valueTwo": 0,
"op": "SCMP_CMP_EQ"
},
{
"index": 2,
"value": 9,
"valueTwo": 0,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {
"caps": [
"CAP_AUDIT_WRITE"
]
},
"errnoRet": 22
},
{
"names": [
"socket"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 2,
"value": 9,
"valueTwo": 0,
"op": "SCMP_CMP_NE"
}
],
"comment": "",
"includes": {},
"excludes": {
"caps": [
"CAP_AUDIT_WRITE"
]
}
},
{
"names": [
"socket"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 0,
"value": 16,
"valueTwo": 0,
"op": "SCMP_CMP_NE"
}
],
"comment": "",
"includes": {},
"excludes": {
"caps": [
"CAP_AUDIT_WRITE"
]
}
},
{
"names": [
"socket"
],
"action": "SCMP_ACT_ALLOW",
"args": [
{
"index": 2,
"value": 9,
"valueTwo": 0,
"op": "SCMP_CMP_NE"
}
],
"comment": "",
"includes": {},
"excludes": {
"caps": [
"CAP_AUDIT_WRITE"
]
}
},
{
"names": [
"socket"
],
"action": "SCMP_ACT_ALLOW",
"args": null,
"comment": "",
"includes": {
"caps": [
"CAP_AUDIT_WRITE"
]
},
"excludes": {}
} }
] ]
} }

109
SOURCES/shortnames.conf Normal file
View File

@ -0,0 +1,109 @@
[aliases]
# almalinux
"almalinux" = "docker.io/library/almalinux"
"almalinux-minimal" = "docker.io/library/almalinux-minimal"
# Arch Linux
"archlinux" = "docker.io/archlinux/archlinux"
# centos
"centos" = "quay.io/centos/centos"
# containers
"skopeo" = "quay.io/skopeo/stable"
"buildah" = "quay.io/buildah/stable"
"podman" = "quay.io/podman/stable"
"hello" = "quay.io/podman/hello"
"hello-world" = "quay.io/podman/hello"
# docker
"alpine" = "docker.io/library/alpine"
"docker" = "docker.io/library/docker"
"registry" = "docker.io/library/registry"
"swarm" = "docker.io/library/swarm"
# Fedora
"fedora-minimal" = "registry.fedoraproject.org/fedora-minimal"
"fedora" = "registry.fedoraproject.org/fedora"
# openSUSE
"opensuse/tumbleweed" = "registry.opensuse.org/opensuse/tumbleweed"
"opensuse/tumbleweed-dnf" = "registry.opensuse.org/opensuse/tumbleweed-dnf"
"opensuse/tumbleweed-microdnf" = "registry.opensuse.org/opensuse/tumbleweed-microdnf"
"opensuse/leap" = "registry.opensuse.org/opensuse/leap"
"opensuse/busybox" = "registry.opensuse.org/opensuse/busybox"
"tumbleweed" = "registry.opensuse.org/opensuse/tumbleweed"
"tumbleweed-dnf" = "registry.opensuse.org/opensuse/tumbleweed-dnf"
"tumbleweed-microdnf" = "registry.opensuse.org/opensuse/tumbleweed-microdnf"
"leap" = "registry.opensuse.org/opensuse/leap"
"leap-dnf" = "registry.opensuse.org/opensuse/leap-dnf"
"leap-microdnf" = "registry.opensuse.org/opensuse/leap-microdnf"
"tw-busybox" = "registry.opensuse.org/opensuse/busybox"
# SUSE
"suse/sle15" = "registry.suse.com/suse/sle15"
"suse/sles12sp5" = "registry.suse.com/suse/sles12sp5"
"suse/sles12sp4" = "registry.suse.com/suse/sles12sp4"
"suse/sles12sp3" = "registry.suse.com/suse/sles12sp3"
"sle15" = "registry.suse.com/suse/sle15"
"sles12sp5" = "registry.suse.com/suse/sles12sp5"
"sles12sp4" = "registry.suse.com/suse/sles12sp4"
"sles12sp3" = "registry.suse.com/suse/sles12sp3"
# Red Hat Enterprise Linux
"rhel" = "registry.access.redhat.com/rhel"
"rhel6" = "registry.access.redhat.com/rhel6"
"rhel7" = "registry.access.redhat.com/rhel7"
"rhel7.9" = "registry.access.redhat.com/rhel7.9"
"rhel-atomic" = "registry.access.redhat.com/rhel-atomic"
"rhel-minimal" = "registry.access.redhat.com/rhel-minimum"
"rhel-init" = "registry.access.redhat.com/rhel-init"
"rhel7-atomic" = "registry.access.redhat.com/rhel7-atomic"
"rhel7-minimal" = "registry.access.redhat.com/rhel7-minimum"
"rhel7-init" = "registry.access.redhat.com/rhel7-init"
"rhel7/rhel" = "registry.access.redhat.com/rhel7/rhel"
"rhel7/rhel-atomic" = "registry.access.redhat.com/rhel7/rhel7/rhel-atomic"
"ubi7/ubi" = "registry.access.redhat.com/ubi7/ubi"
"ubi7/ubi-minimal" = "registry.access.redhat.com/ubi7-minimal"
"ubi7/ubi-init" = "registry.access.redhat.com/ubi7-init"
"ubi7" = "registry.access.redhat.com/ubi7"
"ubi7-init" = "registry.access.redhat.com/ubi7-init"
"ubi7-minimal" = "registry.access.redhat.com/ubi7-minimal"
"rhel8" = "registry.access.redhat.com/ubi8"
"rhel8-init" = "registry.access.redhat.com/ubi8-init"
"rhel8-minimal" = "registry.access.redhat.com/ubi8-minimal"
"rhel8-micro" = "registry.access.redhat.com/ubi8-micro"
"ubi8" = "registry.access.redhat.com/ubi8"
"ubi8-minimal" = "registry.access.redhat.com/ubi8-minimal"
"ubi8-init" = "registry.access.redhat.com/ubi8-init"
"ubi8-micro" = "registry.access.redhat.com/ubi8-micro"
"ubi8/ubi" = "registry.access.redhat.com/ubi8/ubi"
"ubi8/ubi-minimal" = "registry.access.redhat.com/ubi8-minimal"
"ubi8/ubi-init" = "registry.access.redhat.com/ubi8-init"
"ubi8/ubi-micro" = "registry.access.redhat.com/ubi8-micro"
"rhel9" = "registry.access.redhat.com/ubi9"
"rhel9-init" = "registry.access.redhat.com/ubi9-init"
"rhel9-minimal" = "registry.access.redhat.com/ubi9-minimal"
"rhel9-micro" = "registry.access.redhat.com/ubi9-micro"
"ubi9" = "registry.access.redhat.com/ubi9"
"ubi9-minimal" = "registry.access.redhat.com/ubi9-minimal"
"ubi9-init" = "registry.access.redhat.com/ubi9-init"
"ubi9-micro" = "registry.access.redhat.com/ubi9-micro"
"ubi9/ubi" = "registry.access.redhat.com/ubi9/ubi"
"ubi9/ubi-minimal" = "registry.access.redhat.com/ubi9-minimal"
"ubi9/ubi-init" = "registry.access.redhat.com/ubi9-init"
"ubi9/ubi-micro" = "registry.access.redhat.com/ubi9-micro"
# Rocky Linux
"rockylinux" = "docker.io/library/rockylinux"
# Debian
"debian" = "docker.io/library/debian"
# Kali Linux
"kali-bleeding-edge" = "docker.io/kalilinux/kali-bleeding-edge"
"kali-dev" = "docker.io/kalilinux/kali-dev"
"kali-experimental" = "docker.io/kalilinux/kali-experimental"
"kali-last-release" = "docker.io/kalilinux/kali-last-release"
"kali-rolling" = "docker.io/kalilinux/kali-rolling"
# Ubuntu
"ubuntu" = "docker.io/library/ubuntu"
# Oracle Linux
"oraclelinux" = "container-registry.oracle.com/os/oraclelinux"
# busybox
"busybox" = "docker.io/library/busybox"
# php
"php" = "docker.io/library/php"
# python
"python" = "docker.io/library/python"
# node
"node" = "docker.io/library/node"

View File

@ -1,18 +1,22 @@
# storage.conf is the configuration file for all tools # This file is is the configuration file for all tools
# that share the containers/storage libraries # that use the containers/storage library.
# See man 5 containers-storage.conf for more information # See man 5 containers-storage.conf for more information
# The "container storage" table contains all of the server options. # The "container storage" table contains all of the server options.
[storage] [storage]
# Default Storage Driver # Default Storage Driver, Must be set for proper operation.
driver = "overlay" driver = "overlay"
# Temporary storage location # Temporary storage location
runroot = "/var/run/containers/storage" runroot = "/run/containers/storage"
# Primary Read/Write location of container storage # Primary Read/Write location of container storage
graphroot = "/var/lib/containers/storage" graphroot = "/var/lib/containers/storage"
# Storage path for rootless users
#
# rootless_storage_path = "$HOME/.local/share/containers/storage"
[storage.options] [storage.options]
# Storage options to be passed to underlying storage drivers # Storage options to be passed to underlying storage drivers
@ -21,33 +25,95 @@ graphroot = "/var/lib/containers/storage"
additionalimagestores = [ additionalimagestores = [
] ]
# Size is used to set a maximum size of the container image. Only supported by
# certain container storage drivers.
size = ""
# OverrideKernelCheck tells the driver to ignore kernel checks based on kernel version
override_kernel_check = "true"
# Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they should appear inside of # Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they should appear inside of
# a container, to UIDs/GIDs as they should appear outside of the container, and # a container, to the UIDs/GIDs as they should appear outside of the container,
# the length of the range of UIDs/GIDs. Additional mapped sets can be listed # and the length of the range of UIDs/GIDs. Additional mapped sets can be
# and will be heeded by libraries, but there are limits to the number of # listed and will be heeded by libraries, but there are limits to the number of
# mappings which the kernel will allow when you later attempt to run a # mappings which the kernel will allow when you later attempt to run a
# container. # container.
# #
# remap-uids = 0:1668442479:65536 # remap-uids = 0:1668442479:65536
# remap-gids = 0:1668442479:65536 # remap-gids = 0:1668442479:65536
# Remap-User/Group is a name which can be used to look up one or more UID/GID # Remap-User/Group is a user name which can be used to look up one or more UID/GID
# ranges in the /etc/subuid or /etc/subgid file. Mappings are set up starting # ranges in the /etc/subuid or /etc/subgid file. Mappings are set up starting
# with an in-container ID of 0 and the a host-level ID taken from the lowest # with an in-container ID of 0 and then a host-level ID taken from the lowest
# range that matches the specified name, and using the length of that range. # range that matches the specified name, and using the length of that range.
# Additional ranges are then assigned, using the ranges which specify the # Additional ranges are then assigned, using the ranges which specify the
# lowest host-level IDs first, to the lowest not-yet-mapped container-level ID, # lowest host-level IDs first, to the lowest not-yet-mapped in-container ID,
# until all of the entries have been used for maps. # until all of the entries have been used for maps.
# #
# remap-user = "storage" # remap-user = "containers"
# remap-group = "storage" # remap-group = "containers"
# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID
# ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned
# to containers configured to create automatically a user namespace. Containers
# configured to automatically create a user namespace can still overlap with containers
# having an explicit mapping set.
# This setting is ignored when running as rootless.
# root-auto-userns-user = "storage"
#
# Auto-userns-min-size is the minimum size for a user namespace created automatically.
# auto-userns-min-size=1024
#
# Auto-userns-max-size is the minimum size for a user namespace created automatically.
# auto-userns-max-size=65536
[storage.options.overlay]
# ignore_chown_errors can be set to allow a non privileged user running with
# a single UID within a user namespace to run containers. The user can pull
# and use any image even those with multiple uids. Note multiple UIDs will be
# squashed down to the default uid in the container. These images will have no
# separation between the users in the container. Only supported for the overlay
# and vfs drivers.
#ignore_chown_errors = "false"
# Path to an helper program to use for mounting the file system instead of mounting it
# directly.
#mount_program = "/usr/bin/fuse-overlayfs"
# mountopt specifies comma separated list of extra mount options
mountopt = "nodev,metacopy=on"
# Set to skip a PRIVATE bind mount on the storage home directory.
# skip_mount_home = "false"
# Size is used to set a maximum size of the container image.
# size = ""
# ForceMask specifies the permissions mask that is used for new files and
# directories.
#
# The values "shared" and "private" are accepted.
# Octal permission masks are also accepted.
#
# "": No value specified.
# All files/directories, get set with the permissions identified within the
# image.
# "private": it is equivalent to 0700.
# All files/directories get set with 0700 permissions. The owner has rwx
# access to the files. No other users on the system can access the files.
# This setting could be used with networked based homedirs.
# "shared": it is equivalent to 0755.
# The owner has rwx access to the files and everyone else can read, access
# and execute them. This setting is useful for sharing containers storage
# with other users. For instance have a storage owned by root but shared
# to rootless users as an additional store.
# NOTE: All files within the image are made readable and executable by any
# user on the system. Even /etc/shadow within your image is now readable by
# any user.
#
# OCTAL: Users can experiment with other OCTAL Permissions.
#
# Note: The force_mask Flag is an experimental feature, it could change in the
# future. When "force_mask" is set the original permission mask is stored in
# the "user.containers.override_stat" xattr and the "mount_program" option must
# be specified. Mount programs like "/usr/bin/fuse-overlayfs" present the
# extended attribute permissions to processes within containers rather then the
# "force_mask" permissions.
#
# force_mask = ""
[storage.options.thinpool] [storage.options.thinpool]
# Storage Options for thinpool # Storage Options for thinpool
@ -71,10 +137,10 @@ override_kernel_check = "true"
# blocksize="64k" # blocksize="64k"
# directlvm_device specifies a custom block storage device to use for the # directlvm_device specifies a custom block storage device to use for the
# thin pool. Required if you setup devicemapper # thin pool. Required if you setup devicemapper.
# directlvm_device = "" # directlvm_device = ""
# directlvm_device_force wipes device even if device already has a filesystem # directlvm_device_force wipes device even if device already has a filesystem.
# directlvm_device_force = "True" # directlvm_device_force = "True"
# fs specifies the filesystem type to use for the base device. # fs specifies the filesystem type to use for the base device.
@ -99,13 +165,25 @@ override_kernel_check = "true"
# device. # device.
# mkfsarg = "" # mkfsarg = ""
# mountopt specifies extra mount options used when mounting the thin devices. # metadata_size is used to set the `pvcreate --metadatasize` options when
# mountopt = "" # creating thin devices. Default is 128k
# metadata_size = ""
# use_deferred_removal Marking device for deferred removal # Size is used to set a maximum size of the container image.
# size = ""
# use_deferred_removal marks devicemapper block device for deferred removal.
# If the thinpool is in use when the driver attempts to remove it, the driver
# tells the kernel to remove it as soon as possible. Note this does not free
# up the disk space, use deferred deletion to fully remove the thinpool.
# use_deferred_removal = "True" # use_deferred_removal = "True"
# use_deferred_deletion Marking device for deferred deletion # use_deferred_deletion marks thinpool device for deferred deletion.
# If the device is busy when the driver attempts to delete it, the driver
# will attempt to delete device every 30 seconds until successful.
# If the program using the driver exits, the driver will continue attempting
# to cleanup the next time the driver is used. Deferred deletion permanently
# deletes the device and all data stored in device will be lost.
# use_deferred_deletion = "True" # use_deferred_deletion = "True"
# xfs_nospace_max_retries specifies the maximum number of retries XFS should # xfs_nospace_max_retries specifies the maximum number of retries XFS should

View File

@ -1,57 +1,73 @@
%global with_debug 1
%global with_check 0 %global with_check 0
%if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil} %global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0 %global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%if 0%{?rhel} > 7 && ! 0%{?fedora} %if 0%{?rhel} > 7 && ! 0%{?fedora}
%define gobuild(o:) \ %define gobuild(o:) \
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback no_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**}; go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
%endif # distro %else
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v %{?**};
%endif
%global provider github %global import_path github.com/containers/skopeo
%global provider_tld com %global branch release-1.2
%global project containers # Bellow definitions are used to deliver config files from a particular branch
%global repo skopeo # of c/image, c/common, c/storage vendored in all podman, skopeo, buildah.
# https://github.com/containers/skopeo # These vendored components must have the same version. If it is not the case,
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} # pick the oldest version on c/image, c/common, c/storage vendored in
%global import_path %{provider_prefix} # podman/skopeo/podman.
%global git0 https://%{import_path} %global podman_branch v3.0
%global commit0 1715c9084124875cb71f006916396e3c7d03014e %global image_branch v5.10.2
%global common_branch v0.33.4
%global storage_branch v1.24.6
%global shortnames_branch main
%global commit0 7300333dc4ae6de35af9f4f970d064fb124fc6a6
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
# manually listed arches due https://bugzilla.redhat.com/show_bug.cgi?id=1391932 (removed ppc64)
# remove ix86 temporarily because go-toolset issues
ExcludeArch: ppc64 %{ix86}
Name: %{repo}
Epoch: 1 Epoch: 1
Version: 0.1.32 Name: skopeo
Release: 6.git%{shortcommit0}%{?dist} Version: 1.2.4
Summary: Inspect Docker images and repositories on registries Release: 2%{?dist}
Summary: Inspect container images and repositories on registries
License: ASL 2.0 License: ASL 2.0
URL: %{git0} URL: %{git0}
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz # https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
Source1: storage.conf ExclusiveArch: %{go_arches}
Source2: containers-storage.conf.5.md %if 0%{?branch:1}
Source0: https://%{import_path}/tarball/%{commit0}/%{branch}-%{shortcommit0}.tar.gz
%else
Source0: https://%{import_path}/archive/%{commit0}/%{name}-%{version}-%{shortcommit0}.tar.gz
%endif
Source1: https://raw.githubusercontent.com/containers/storage/%{storage_branch}/storage.conf
Source2: https://raw.githubusercontent.com/containers/storage/%{storage_branch}/docs/containers-storage.conf.5.md
Source3: mounts.conf Source3: mounts.conf
Source4: registries.conf.5.md Source4: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.conf.5.md
#Source5: https://raw.githubusercontent.com/containers/image/%%{image_branch}/registries.conf
Source5: registries.conf Source5: registries.conf
Source6: policy.json.5.md Source6: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-policy.json.5.md
Source7: seccomp.json Source7: https://raw.githubusercontent.com/containers/common/%{common_branch}/pkg/seccomp/seccomp.json
Source8: https://raw.githubusercontent.com/containers/podman/%{podman_branch}/docs/source/markdown/containers-mounts.conf.5.md
Source9: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-signature.5.md
Source10: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-transports.5.md
Source11: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-certs.d.5.md
Source12: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.d.5.md
Source13: https://raw.githubusercontent.com/containers/common/%{common_branch}/pkg/config/containers.conf
Source14: https://raw.githubusercontent.com/containers/common/%{common_branch}/docs/containers.conf.5.md
Source15: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-auth.json.5.md
Source16: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.conf.d.5.md
Source17: https://raw.githubusercontent.com/containers/shortnames/%{shortnames_branch}/shortnames.conf
Source18: https://raw.githubusercontent.com/containers/image/%{image_branch}/docs/containers-registries.conf.5.md
Source19: rhel-shortnames.conf
BuildRequires: git BuildRequires: git
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: golang >= 1.12.12-4
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} BuildRequires: go-md2man
BuildRequires: golang-github-cpuguy83-go-md2man
BuildRequires: gpgme-devel BuildRequires: gpgme-devel
BuildRequires: libassuan-devel BuildRequires: libassuan-devel
BuildRequires: pkgconfig(devmapper) BuildRequires: pkgconfig(devmapper)
BuildRequires: ostree-devel BuildRequires: ostree-devel
BuildRequires: glib2-devel BuildRequires: glib2-devel
BuildRequires: make
Requires: containers-common = %{epoch}:%{version}-%{release} Requires: containers-common = %{epoch}:%{version}-%{release}
%description %description
@ -67,13 +83,34 @@ Provides: %{name}-containers = %{epoch}:%{version}-%{release}
Obsoletes: %{name}-containers <= 1:0.1.31-3 Obsoletes: %{name}-containers <= 1:0.1.31-3
Recommends: fuse-overlayfs Recommends: fuse-overlayfs
Recommends: slirp4netns Recommends: slirp4netns
Suggests: subscription-manager
%description -n containers-common %description -n containers-common
This package installs a default signature store configuration and a default This package installs a default signature store configuration and a default
policy under `/etc/containers/`. policy under `/etc/containers/`.
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
#Requires: bats (which RHEL8 doesn't have. If it ever does, un-comment this)
Requires: gnupg
Requires: jq
Requires: podman
Requires: httpd-tools
%description tests
%{summary}
This package contains system tests for %{name}
%prep %prep
%if 0%{?branch:1}
%autosetup -Sgit -n containers-%{name}-%{shortcommit0}
%else
%autosetup -Sgit -n %{name}-%{commit0} %autosetup -Sgit -n %{name}-%{commit0}
%endif
sed -i 's/install-binary: bin\/%{name}/install-binary:/' Makefile
sed -i 's/install-docs: docs/install-docs:/' Makefile
%build %build
mkdir -p src/github.com/containers mkdir -p src/github.com/containers
@ -88,35 +125,70 @@ for v in vendor/*; do
done done
export GOPATH=$(pwd):$(pwd)/vendor:%{gopath} export GOPATH=$(pwd):$(pwd)/vendor:%{gopath}
#make BUILDTAGS='exclude_graphdriver_btrfs' binary-local docs export GO111MODULE=off
export BUILDTAGS="exclude_graphdriver_btrfs" export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
%gobuild -o %{name} ./cmd/%{name} export BUILDTAGS="exclude_graphdriver_btrfs btrfs_noversion $(hack/libdm_tag.sh) $(hack/ostree_tag.sh)"
make docs mkdir -p bin
%gobuild -o bin/%{name} ./cmd/%{name}
%{__make} docs
%install %install
make DESTDIR=%{buildroot} install make \
mkdir -p %{buildroot}%{_sysconfdir} DESTDIR=%{buildroot} \
SIGSTOREDIR=%{buildroot}%{_sharedstatedir}/containers/sigstore \
install
install -dp %{buildroot}%{_sysconfdir}/containers/{certs.d,oci/hooks.d,registries.d,registries.conf.d}
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/storage.conf install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/containers/storage.conf
mkdir -p %{buildroot}%{_mandir}/man5 install -m0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/containers/registries.conf
install -m0644 %{SOURCE17} %{buildroot}%{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
install -m0644 %{SOURCE19} %{buildroot}%{_sysconfdir}/containers/registries.conf.d/rhel-shortnames.conf
install -dp %{buildroot}%{_mandir}/man5
go-md2man -in %{SOURCE2} -out %{buildroot}%{_mandir}/man5/containers-storage.conf.5 go-md2man -in %{SOURCE2} -out %{buildroot}%{_mandir}/man5/containers-storage.conf.5
go-md2man -in %{SOURCE4} -out %{buildroot}%{_mandir}/man5/registries.conf.5 go-md2man -in %{SOURCE4} -out %{buildroot}%{_mandir}/man5/containers-registries.conf.5
install -p -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/containers/ go-md2man -in %{SOURCE6} -out %{buildroot}%{_mandir}/man5/containers-policy.json.5
go-md2man -in %{SOURCE6} -out %{buildroot}%{_mandir}/man5/policy.json.5 go-md2man -in %{SOURCE8} -out %{buildroot}%{_mandir}/man5/containers-mounts.conf.5
go-md2man -in %{SOURCE9} -out %{buildroot}%{_mandir}/man5/containers-signature.5
go-md2man -in %{SOURCE10} -out %{buildroot}%{_mandir}/man5/containers-transports.5
go-md2man -in %{SOURCE11} -out %{buildroot}%{_mandir}/man5/containers-certs.d.5
go-md2man -in %{SOURCE12} -out %{buildroot}%{_mandir}/man5/containers-registries.d.5
go-md2man -in %{SOURCE18} -out %{buildroot}%{_mandir}/man5/containers-registries.conf.d.5
go-md2man -in %{SOURCE14} -out %{buildroot}%{_mandir}/man5/containers.conf.5
go-md2man -in %{SOURCE15} -out %{buildroot}%{_mandir}/man5/containers-auth.json.5
go-md2man -in %{SOURCE16} -out %{buildroot}%{_mandir}/man5/containers-registries.conf.d.5
mkdir -p %{buildroot}%{_datadir}/containers install -dp %{buildroot}%{_datadir}/containers
install -m0644 %{SOURCE3} %{buildroot}%{_datadir}/containers/mounts.conf install -m0644 %{SOURCE3} %{buildroot}%{_datadir}/containers/mounts.conf
install -m0644 %{SOURCE7} %{buildroot}%{_datadir}/containers/seccomp.json install -m0644 %{SOURCE7} %{buildroot}%{_datadir}/containers/seccomp.json
install -m0644 %{SOURCE13} %{buildroot}%{_datadir}/containers/containers.conf
# install secrets patch directory # install secrets patch directory
install -d -p -m 750 %{buildroot}/%{_datadir}/rhel/secrets install -d -p -m 755 %{buildroot}/%{_datadir}/rhel/secrets
# rhbz#1110876 - update symlinks for subscription management # rhbz#1110876 - update symlinks for subscription management
ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement ln -s %{_sysconfdir}/pki/entitlement %{buildroot}%{_datadir}/rhel/secrets/etc-pki-entitlement
ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm ln -s %{_sysconfdir}/rhsm %{buildroot}%{_datadir}/rhel/secrets/rhsm
ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/rhel7.repo ln -s %{_sysconfdir}/yum.repos.d/redhat.repo %{buildroot}%{_datadir}/rhel/secrets/redhat.repo
# ship preconfigured /etc/containers/registries.d/ files with containers-common - #1903813
cat <<EOF > %{buildroot}%{_sysconfdir}/containers/registries.d/registry.access.redhat.com.yaml
docker:
registry.access.redhat.com:
sigstore: https://access.redhat.com/webassets/docker/content/sigstore
EOF
cat <<EOF > %{buildroot}%{_sysconfdir}/containers/registries.d/registry.redhat.io.yaml
docker:
registry.redhat.io:
sigstore: https://registry.redhat.io/containers/sigstore
EOF
# system tests
install -d -p %{buildroot}/%{_datadir}/%{name}/test/system
cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
%check %check
%if 0%{?with_check} %if 0%{?with_check}
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/integration %gotest %{import_path}/integration
%endif %endif
@ -125,38 +197,254 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%files -n containers-common %files -n containers-common
%dir %{_sysconfdir}/containers %dir %{_sysconfdir}/containers
%dir %{_sysconfdir}/containers/certs.d
%dir %{_sysconfdir}/containers/registries.d %dir %{_sysconfdir}/containers/registries.d
%dir %{_sysconfdir}/containers/oci
%dir %{_sysconfdir}/containers/oci/hooks.d
%dir %{_sysconfdir}/containers/registries.conf.d
%config(noreplace) %{_sysconfdir}/containers/policy.json %config(noreplace) %{_sysconfdir}/containers/policy.json
%config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml %config(noreplace) %{_sysconfdir}/containers/registries.d/default.yaml
%config(noreplace) %{_sysconfdir}/containers/storage.conf %config(noreplace) %{_sysconfdir}/containers/storage.conf
%config(noreplace) %{_sysconfdir}/containers/registries.conf %config(noreplace) %{_sysconfdir}/containers/registries.conf
%dir %{_sharedstatedir}/atomic/sigstore %config(noreplace) %{_sysconfdir}/containers/registries.conf.d/000-shortnames.conf
%config(noreplace) %{_sysconfdir}/containers/registries.conf.d/rhel-shortnames.conf
%config(noreplace) %{_sysconfdir}/containers/registries.d/*.yaml
%ghost %{_sysconfdir}/containers/containers.conf
%dir %{_sharedstatedir}/containers/sigstore
%{_mandir}/man5/* %{_mandir}/man5/*
%dir %{_datadir}/containers %dir %{_datadir}/containers
%{_datadir}/containers/mounts.conf %{_datadir}/containers/mounts.conf
%{_datadir}/containers/seccomp.json %{_datadir}/containers/seccomp.json
%{_datadir}/containers/containers.conf
%dir %{_datadir}/rhel/secrets %dir %{_datadir}/rhel/secrets
%{_datadir}/rhel/secrets/etc-pki-entitlement %{_datadir}/rhel/secrets/*
%{_datadir}/rhel/secrets/rhel7.repo
%{_datadir}/rhel/secrets/rhsm
%files %files
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%{_bindir}/%{name} %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}*
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/%{name} %{_datadir}/bash-completion/completions/%{name}
%files tests
%license LICENSE
%{_datadir}/%{name}/test
%changelog %changelog
* Fri Jun 26 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.1.32-6.git1715c90 * Tue May 03 2022 Jindrich Novy <jnovy@redhat.com> - 1:1.2.4-2
- bump release to preserve upgrade path - update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/7300333)
- Related: #2061390
* Wed Sep 15 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.4-1
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/9921983)
- Related: #2001445
* Thu Jul 15 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.2-10
- update shortnames from Pyxis
- sync with the vendored versions in 3.0-8.5.0
- bump release to assure upgrade path from 3.0-8.4.0
- Related: #1934415
* Fri Feb 19 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.2-1
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/e72dd9c)
- Related: #1883490
* Thu Feb 18 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-13
- rename shortnames.conf to 000-shortnames.conf to assure evaluation order
- Related: #1883490
* Thu Feb 18 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-12
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/3abb778)
- Related: #1883490
* Mon Feb 15 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-11
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/b4210c0)
- Resolves: #1914884
* Sat Feb 06 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-10
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/6c0e35a)
- Related: #1883490
* Tue Feb 02 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-9
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/a05ddb8)
- Related: #1883490
* Sun Jan 31 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-8
- define 8.4.0 branch for podman (v3.0)
- remove redundant source file
- Related: #1883490
* Sun Jan 31 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-7
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/2e90a8a)
- Related: #1883490
* Tue Jan 19 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-6
- fix rhel-shortnames.conf generation (avoid duplicates and records
with invalid URL)
- Related: #1883490
* Mon Jan 18 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-5
- assure "NET_RAW" is always defined
- support rhel-shortnames.conf with generated shortname/registry aliases
- Related: #1883490
* Fri Jan 15 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-4
- add "NET_RAW" default capability
- Related: #1883490
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-3
- ship preconfigured /etc/containers/registries.d/ files with containers-common
- Related: #1883490
* Tue Jan 12 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-2
- add shortnames from https://github.com/containers/shortnames
- Related: #1883490
* Mon Jan 11 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.1-1
- update vendored component versions
- update to the latest content of https://github.com/containers/skopeo/tree/release-1.2
(https://github.com/containers/skopeo/commit/2e90a8a)
- Related: #1883490
* Fri Jan 08 2021 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-6
- gating tests fixes and bump podman branch
- Related: #1883490
* Tue Dec 08 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-5
- still use arch exclude as the go_arches macro is broken for 8.4
- Related: #1883490
* Wed Dec 02 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-4
- unify vendored branches
- add validation script
- Related: #1883490
* Thu Nov 05 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-3
- simplify spec file
- use short commit ID in tarball name
- Related: #1883490
* Fri Oct 23 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-2
- synchronize with stream-container-tools-rhel8
- Related: #1883490
* Thu Oct 22 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.2.0-1
- synchronize with stream-container-tools-rhel8
- Related: #1883490
* Tue Aug 11 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.1.1-3
- propagate proper CFLAGS to CGO_CFLAGS to assure code hardening and optimization
- Related: #1821193 - Related: #1821193
* Thu Nov 28 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.32-4.git1715c90 * Wed Jul 29 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.1.1-2
- drop applied patches
- Related: #1821193
* Wed Jul 29 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.1.1-1
- update to https://github.com/containers/skopeo/releases/tag/v1.1.1
- Related: #1821193
* Thu Jul 23 2020 Eduardo Santiago <santiago@redhat.com> - 1:1.1.0-3
- fix broken gating tests: docker unexpectedly removed htpasswd from
their 'registry:2' image, so we now use htpasswd from httpd-tools on host.
* Fri Jul 17 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.1.0-2
- fix "CVE-2020-14040 skopeo: golang.org/x/text: possibility to trigger an infinite loop in encoding/unicode could lead to crash [rhel-8]"
- Resolves: #1854719
* Fri Jun 19 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.1.0-1
- update to https://github.com/containers/skopeo/releases/tag/v1.1.0
- Related: #1821193
* Wed Jun 10 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.0.0-2
- exclude i686 arch
- Related: #1821193
* Tue May 19 2020 Jindrich Novy <jnovy@redhat.com> - 1:1.0.0-1
- update to https://github.com/containers/skopeo/releases/tag/v1.0.0
- Related: #1821193
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.2.0-6
- synchronize containter-tools 8.3.0 with 8.2.1
- Related: #1821193
* Mon Apr 06 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.1.41-1
- update to 0.1.41
- Related: #1821193
* Fri Mar 06 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-10
- modify registries.conf default configuration to be more secure by default
- Resolves: #1810053
* Fri Feb 14 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-9
- Fix CVE-2020-1702.
- Resolves: #1801922
* Thu Jan 02 2020 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-8
- change the search order of registries and remove quay.io (#1784267)
* Wed Dec 11 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-7
- compile in FIPS mode
- Related: RHELPLAN-25139
* Mon Dec 09 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-6
- be sure to use golang >= 1.12.12-4
- Related: RHELPLAN-25139
* Wed Dec 04 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-5
- fix file list
- Related: RHELPLAN-25139
* Wed Dec 04 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-4
- fix symlinks in /usr/share/rhel/secrets and make
subscription-manager soft dependency to make them work
- Related: RHELPLAN-25139
* Thu Nov 28 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-3
- rebuild because of CVE-2019-9512 and CVE-2019-9514 - rebuild because of CVE-2019-9512 and CVE-2019-9514
- Resolves: #1772130, #1772135 - Resolves: #1772132, #1772137
* Wed Nov 20 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-2
- comment out mountopt option in order to fix gating tests
see bug 1769769
- Related: RHELPLAN-25139
* Wed Nov 06 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.40-1
- update to 0.1.40
- Related: RHELPLAN-25139
* Thu Sep 12 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.37-5
- Fix CVE-2019-10214 (#1734651).
* Thu Aug 15 2019 Jindrich Novy <jnovy@redhat.com> - 1:0.1.37-4
- fix permissions of rhel/secrets
Resolves: #1691543
* Fri Jun 14 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.37-3
- Resolves: #1719994 - add registry.access.redhat.com to registries.conf
* Fri Jun 14 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.37-2
- Resolves: #1721247 - enable fips mode
* Fri Jun 14 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.37-1
- Resolves: #1720654 - rebase to v0.1.37
* Tue Jun 4 2019 Eduardo Santiago <santiago@redhat.com> - 1:0.1.36-1.git6307635
- built upstream tag v0.1.36, including system tests
* Tue Apr 30 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.1.32-4.git1715c90
- Fixes @openshift/machine-config-operator#669
- install /etc/containers/oci/hooks.d and /etc/containers/certs.d
* Tue Dec 18 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.32-3.git1715c90 * Tue Dec 18 2018 Frantisek Kluknavsky <fkluknav@redhat.com> - 1:0.1.32-3.git1715c90
- rebase - rebase