moby--moby/hack
Sebastiaan van Stijn 9b2f55bc1c
update containerd binary to v1.5.0
Welcome to the v1.5.0 release of containerd!

The sixth major release of containerd includes many stability improvements
and code organization changes to make contribution easier and make future
features cleaner to develop. This includes bringing CRI development into the
main containerd repository and switching to Go modules. This release also
brings support for the Node Resource Interface (NRI).

Highlights
--------------------------------------------------------------------------------

*Project Organization*

- Merge containerd/cri codebase into containerd/containerd
- Move to Go modules
- Remove selinux build tag
- Add json log format output option for daemon log

*Snapshots*

- Add configurable overlayfs path
- Separate overlay implementation from plugin
- Native snapshotter configuration and plugin separation
- Devmapper snapshotter configuration and plugin separation
- AUFS snapshotter configuration and plugin separation
- ZFS snapshotter configuration and plugin separation
- Pass custom snapshot labels when creating snapshot
- Add platform check for snapshotter support when unpacking
- Handle loopback mounts
- Support userxattr mount option for overlay in user namespace
- ZFS snapshotter implementation of usage

*Distribution*

- Improve registry response errors
- Improve image pull performance over HTTP 1.1
- Registry configuration package
- Add support for layers compressed with zstd
- Allow arm64 to fallback to arm (v8, v7, v6, v5)

*Runtime*

- Add annotations to containerd task update API
- Add logging binary support when terminal is true
- Runtime support on FreeBSD

*Windows*

- Implement windowsDiff.Compare to allow outputting OCI images
- Optimize WCOW snapshotter to commit writable layers as read-only parent layers
- Optimize LCOW snapshotter use of scratch layers

*CRI*

- Add NRI injection points cri#1552
- Add support for registry host directory configuration
- Update privileged containers to use current capabilities instead of known capabilities
- Add pod annotations to CNI call
- Enable ocicrypt by default
- Support PID NamespaceMode_TARGET

Impactful Client Updates
--------------------------------------------------------------------------------

This release has changes which may affect projects which import containerd.

*Switch to Go modules*

containerd and all containerd sub-repositories are now using Go modules. This
should help make importing easier for handling transitive dependencies. As of
this release, containerd still does not guarantee client library compatibility
for 1.x versions, although best effort is made to minimize impact from changes
to exported Go packages.

*CRI plugin moved to main repository*

With the CRI plugin moving into the main repository, imports under github.com/containerd/cri/
can now be found github.com/containerd/containerd/pkg/cri/.
There are no changes required for end users of CRI.

*Library changes*

oci

The WithAllCapabilities has been removed and replaced with WithAllCurrentCapabilities
and WithAllKnownCapabilities. WithAllKnownCapabilities has similar
functionality to the previous WithAllCapabilities with added support for newer
capabilities. WithAllCurrentCapabilities can be used to give privileged
containers the same set of permissions as the calling process, preventing errors
when privileged containers attempt to get more permissions than given to the
caller.

*Configuration changes*

New registry.config_path for CRI plugin

registry.config_path specifies a directory to look for registry hosts
configuration. When resolving an image name during pull operations, the CRI
plugin will look in the <registry.config_path>/<image hostname>/ directory
for host configuration. An optional hosts.toml file in that directory may be
used to configure which hosts will be used for the pull operation as well
host-specific configurations. Updates under that directory do not require
restarting the containerd daemon.

Enable registry.config_path in the containerd configuration file.

    [plugins."io.containerd.grpc.v1.cri".registry]
       config_path = "/etc/containerd/certs.d"
    Configure registry hosts, such as /etc/containerd/certs.d/docker.io/hosts.toml
    for any image under the docker.io namespace (any image on Docker Hub).

    server = "https://registry-1.docker.io"

    [host."https://public-mirror.example.com"]
      capabilities = ["pull"]
    [host."https://docker-mirror.internal"]
      capabilities = ["pull", "resolve"]
      ca = "docker-mirror.crt"

If no hosts.toml configuration exists in the host directory, it will fallback
to check certificate files based on Docker's certificate file
pattern (".crt" files for CA certificates and ".cert"/".key" files for client
certificates).

*Deprecation of registry.mirrors and registry.configs in CRI plugin*

Mirroring and TLS can now be configured using the new registry.config_path
option. Existing configurations may be migrated to new host directory
configuration. These fields are only deprecated with no planned removal,
however, these configurations cannot be used while registry.config_path is
defined.

*Version 1 schema is deprecated*

Version 2 of the containerd configuration toml is recommended format and the
default. Starting this version, a deprecation warning will be logged when
version 1 is used.

To check version, see the version value in the containerd toml configuration.

    version=2

FreeBSD Runtime Support (Experimental)
--------------------------------------------------------------------------------

This release includes changes that allow containerd to run on FreeBSD with a
compatible runtime, such as runj. This
support should be considered experimental and currently there are no official
binary releases for FreeBSD. The runtimes used by containerd are maintained
separately and have their own stability guarantees. The containerd project
strives to be compatible with any runtime which aims to implement containerd's
shim API and OCI runtime specification.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-04 15:45:01 +02:00
..
ci Don't clear the exit code from the Finally block 2020-11-08 23:15:15 +11:00
dockerfile/install update containerd binary to v1.5.0 2021-05-04 15:45:01 +02:00
make testing: update docker-py 5.0.0 2021-04-06 19:15:42 +02:00
test run shfmt 2020-03-03 12:27:49 +09:00
validate validate/toml: switch to github.com/pelletier/go-toml 2021-04-02 16:08:17 +02:00
README.md Remove references to old release process 2018-05-18 18:28:43 +00:00
dind hack/dind: fix cgroup v2 evacuation with `docker run --init` 2021-04-28 13:30:10 +09:00
generate-authors.sh run shfmt 2020-03-03 12:27:49 +09:00
generate-swagger-api.sh hack: fix mixed tabs/spaces for indentation 2019-08-02 15:58:33 +02:00
make.ps1 Add TestBuildWCOWSandboxSize integration test 2020-11-10 19:51:46 +11:00
make.sh hack/make.sh: remove extra empty lines 2020-03-03 12:36:06 +09:00
vendor.sh vendor: add local copy of archive/tar 2020-04-24 11:22:24 -07:00

README.md

About

This directory contains a collection of scripts used to build and manage this repository. If there are any issues regarding the intention of a particular script (or even part of a certain script), please reach out to us. It may help us either refine our current scripts, or add on new ones that are appropriate for a given use case.

DinD (dind.sh)

DinD is a wrapper script which allows Docker to be run inside a Docker container. DinD requires the container to be run with privileged mode enabled.

Generate Authors (generate-authors.sh)

Generates AUTHORS; a file with all the names and corresponding emails of individual contributors. AUTHORS can be found in the home directory of this repository.

Make

There are two make files, each with different extensions. Neither are supposed to be called directly; only invoke make. Both scripts run inside a Docker container.

make.ps1

  • The Windows native build script that uses PowerShell semantics; it is limited unlike hack\make.sh since it does not provide support for the full set of operations provided by the Linux counterpart, make.sh. However, make.ps1 does provide support for local Windows development and Windows to Windows CI. More information is found within make.ps1 by the author, @jhowardmsft

make.sh

  • Referenced via make test when running tests on a local machine, or directly referenced when running tests inside a Docker development container.
  • When running on a local machine, make test to run all tests found in test, test-unit, test-integration, and test-docker-py on your local machine. The default timeout is set in make.sh to 60 minutes (${TIMEOUT:=60m}), since it currently takes up to an hour to run all of the tests.
  • When running inside a Docker development container, hack/make.sh does not have a single target that runs all the tests. You need to provide a single command line with multiple targets that performs the same thing. An example referenced from Run targets inside a development container: root@5f8630b873fe:/go/src/github.com/moby/moby# hack/make.sh dynbinary binary cross test-unit test-integration test-docker-py
  • For more information related to testing outside the scope of this README, refer to Run tests and test documentation

Vendor (vendor.sh)

A shell script that is a wrapper around Vndr. For information on how to use this, please refer to vndr's README