Commit graph

38734 commits

Author SHA1 Message Date
Brian Goff
f63f73a4a8 Configure shims from runtime config
In dockerd we already have a concept of a "runtime", which specifies the
OCI runtime to use (e.g. runc).
This PR extends that config to add containerd shim configuration.
This option is only exposed within the daemon itself (cannot be
configured in daemon.json).
This is due to issues in supporting unknown shims which will require
more design work.

What this change allows us to do is keep all the runtime config in one
place.

So the default "runc" runtime will just have it's already existing shim
config codified within the runtime config alone.
I've also added 2 more "stock" runtimes which are basically runc+shimv1
and runc+shimv2.
These new runtime configurations are:

- io.containerd.runtime.v1.linux - runc + v1 shim using the V1 shim API
- io.containerd.runc.v2 - runc + shim v2

These names coincide with the actual names of the containerd shims.

This allows the user to essentially control what shim is going to be
used by either specifying these as a `--runtime` on container create or
by setting `--default-runtime` on the daemon.

For custom/user-specified runtimes, the default shim config (currently
shim v1) is used.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-07-13 14:18:02 -07:00
Brian Goff
6fd94aa933 Fix lint error on sprintf call for runtime string
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-07-09 15:41:44 -07:00
Brian Goff
3b4cfa9723
Merge pull request #41029 from thaJeztah/bump_selinux
vendor: opencontainers/selinux v1.5.2
2020-07-01 11:15:51 -07:00
Tianon Gravi
7932d4adec
Merge pull request #41145 from wanghuaiqing2010/master
Upgrading the versions of images in Dockerfile.
2020-07-01 11:14:28 -07:00
Brian Goff
534e219ad5
Merge pull request #41169 from tao12345666333/update-containerd-v1.3.6 2020-07-01 10:58:55 -07:00
Jintao Zhang
85e3dddccd update containerd to v1.3.6
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-07-02 00:12:56 +08:00
wanghuaiqing
228d74842f Upgrading the versions of images in Dockerfile.
In order to run tests at mips64el device.
Now official-images has supported the following images for mips64el.
buildpack-deps:stretch
buildpack-deps:buster
debian:stretch
debian:buster

But official-images does not support the following images for mips64el.
debian:jessie
buildpack-deps:jessie

Signed-off-by: wanghuaiqing <wanghuaiqing@loongson.cn>
2020-06-30 12:24:06 +08:00
Brian Goff
a70842f9c8
Merge pull request #41151 from thaJeztah/fix_gotestsum_install_again 2020-06-29 09:38:42 -07:00
Brian Goff
b0a8e75c6e
Merge pull request #41161 from thaJeztah/fix_volumes_from_status 2020-06-29 09:36:12 -07:00
Sebastiaan van Stijn
b4277c23b0
Merge pull request #41159 from tao12345666333/bump-containerd-v1.3.5
update containerd to v1.3.5
2020-06-29 15:51:25 +02:00
Sebastiaan van Stijn
3258d565cf
Fix status code for missing --volumes-from container
If the container specified in `--volumes-from` did not exist, the
API returned a 404 status, which was interpreted by the CLI as the
specified _image_ to be missing (even if that was not the case).

This patch changes these error to return a 400 (bad request);

Before this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Unable to find image 'busybox:latest' locally
    # latest: Pulling from library/busybox
    # Digest: sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209
    # Status: Image is up to date for busybox:latest
    # Error response from daemon: No such container: nosuchcontainer

After this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Error response from daemon: No such container: nosuchcontainer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-29 13:28:14 +02:00
Sebastiaan van Stijn
b50ba3da12
Merge pull request #41155 from jienius/improve-docs
fix typos and grammar in docs
2020-06-27 21:42:48 +02:00
Jintao Zhang
0e915e5413 update containerd to v1.3.5
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-06-27 11:09:38 +08:00
Jie Ma
3b80af727a fix typos and grammar in docs
Signed-off-by: Jie Ma <jienius@outlook.com>
2020-06-26 17:30:59 -06:00
Tianon Gravi
5643da825c
Merge pull request #41148 from AkihiroSuda/remove-dm-install-bundle.sh
contrib: remove docker-machine-install-bundle.sh
2020-06-26 11:44:13 -07:00
Sebastiaan van Stijn
b24f17068c
Merge pull request #41158 from Flowdalic/allow-rseq-seccomp
seccomp: allow 'rseq' syscall in default seccomp profile
2020-06-26 16:59:03 +02:00
Sebastiaan van Stijn
a9d22cad93
hack/install: build gotestsum without -buildmode=pie
No need for this binary as it's only used in tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-26 16:57:09 +02:00
Sebastiaan van Stijn
20570d91c8
Dockerfile.windows: fix gotestsum.installer installing wrong version
When using go modules, `go build` will always fetch the latest
version of the package, so ignores the version we previously `go get`'d.

Instead of running `go get` and `go build` separately, this patch uses
`go get` (without the `-d` option) to do it all in one step.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-26 16:56:31 +02:00
Sebastiaan van Stijn
441aff3a17
fix gotestsum.installer installing wrong version
When using go modules, `go build` will always fetch the latest
version of the package, so ignores the version we previously `go get`'d.

Instead of running `go get` and `go build` separately, this patch uses
`go get` (without the `-d` option) to do it all in one step.

Given that this binary is only used for testing, and only used inside the
Dockerfile, we should consider inlining this step in the Dockerfile itself,
but keeping that separate for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-26 16:56:15 +02:00
Florian Schmaus
d0d99b04cf seccomp: allow 'rseq' syscall in default seccomp profile
Restartable Sequences (rseq) are a kernel-based mechanism for fast
update operations on per-core data in user-space. Some libraries, like
the newest version of Google's TCMalloc, depend on it [1].

This also makes dockers default seccomp profile on par with systemd's,
which enabled 'rseq' in early 2019 [2].

1: https://google.github.io/tcmalloc/design.html
2: 6fee3be0b4

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
2020-06-26 16:06:26 +02:00
Sebastiaan van Stijn
07cea2edf0
Merge pull request #41106 from tonistiigi/buildkit-upgrade-fix
builder-next: update to new buildkit and fix upgrade bugs
2020-06-26 10:43:45 +02:00
Tibor Vass
13a56fee4e
Merge pull request #41153 from thaJeztah/fix_linting
chrootarchive: fix "conversion from int to string yields a string of one rune"
2020-06-25 15:02:38 -07:00
Brian Goff
d0ec81dbb2
Merge pull request #41146 from AkihiroSuda/dockerd-rootless-sh-port-driver
dockerd-rootless.sh: allow specifying DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER
2020-06-25 14:21:55 -07:00
Tibor Vass
95e92d6c78
Merge pull request #41140 from thaJeztah/fix_TestUserNoEffectiveCapabilitiesNetBindService
TestUserNoEffectiveCapabilitiesNetBindService: conditionally set net.ipv4.ip_unprivileged_port_start
2020-06-25 11:42:44 -07:00
Tibor Vass
8e7e267521
Merge pull request #41125 from thaJeztah/TestDaemonDNSFallback_timeout
TestDaemonDNSFallback: increase timeout to reduce flakiness
2020-06-25 11:34:52 -07:00
Tibor Vass
7f96a9a35b
Merge pull request #41147 from thaJeztah/remove_unmaintained_examples
contrib: remove outdated examples and files
2020-06-25 11:32:57 -07:00
Brian Goff
ba847cf5b5
Merge pull request #41150 from thaJeztah/more_buster
Switch all Dockerfiles to use "buster" variant
2020-06-25 11:27:16 -07:00
Akihiro Suda
36218123ff
Merge pull request #41022 from thaJeztah/smarter_resolv
Better selection of DNS server
2020-06-25 21:22:33 +09:00
Sebastiaan van Stijn
ab6b92b6b2
chrootarchive: fix "conversion from int to string yields a string of one rune"
update test to fix go 1.15 linting failure:

    pkg/chrootarchive/archive_test.go:103:32: conversion from int to string yields a string of one rune

relates to golang/go 32479

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-25 13:38:42 +02:00
Tianon Gravi
453320bd64
Merge pull request #41149 from AkihiroSuda/project-remove-outdated-docs
project: remove obviously outdated docs
2020-06-24 13:52:18 -07:00
Sebastiaan van Stijn
671459a989
Switch all Dockerfiles to use "buster" variant
Commit 4e3ab9e9fb switched the
main Dockerfile to the "buster" variant, but did not update
some of the other Dockerfiles.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 14:31:04 +02:00
Akihiro Suda
a8ae48d94f
project: remove obviously outdated docs
Remove the following files:
- ARM.md (ARM hosts including ARM64 are fully supported now)
- IRC-ADMINISTRATION.md (IRC has gone)
- PACKAGE-REPO-MAINTENANCE.md (deb/rpm has moved to https://github.com/docker/docker-ce-packaging)
- TOOLS.md (most tools except Jenkins are unused/unmaintained)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-24 19:58:25 +09:00
Akihiro Suda
c66c5f4904
contrib: remove docker-machine-install-bundle.sh
Docker Machine is deprecated now

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-24 19:46:38 +09:00
Sebastiaan van Stijn
32b4590b23
contrib: remove REVIEWERS files
We were not really using these, and they haven't been
updated in a long time. If needed, we can add people to
the CODEOWNERS file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 12:12:09 +02:00
Sebastiaan van Stijn
45eb4e0d80
contrib: remove outdated vagrant docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 12:09:23 +02:00
Sebastiaan van Stijn
6b6af2abd9
contrib: remove outdated "desktop-integration" examples
These Dockerfiles haven't been maintained, and more up-to-date
versions can be found in Jess's github repository;

- chromium: 3679486e0b/chromium
- gparted: 3679486e0b/gparted

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-24 12:03:21 +02:00
Akihiro Suda
6743320a12
dockerd-rootless.sh: allow specifying DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER
The default port driver "builtin" might not be always preferrable as it
drops src IP information: https://github.com/containers/libpod/pull/6324

Now the port driver can be changed to "slirp4netns" via the environment
variable `DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER`.

It is still recommended to use the default "builtin" driver.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-24 15:43:45 +09:00
Sebastiaan van Stijn
c3acd082c7
TestUserNoEffectiveCapabilitiesNetBindService: conditionally set net.ipv4.ip_unprivileged_port_start
Prevent the test from failng on environments where this sysctl is not supported.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-22 13:27:52 +02:00
Sebastiaan van Stijn
4609153995
Merge pull request #41098 from AkihiroSuda/rootless-safe-fallback
dockerd-rootless-setuptool.sh: use safer XRD on non-systemd hosts
2020-06-22 10:16:40 +02:00
Tõnis Tiigi
33fba35d42
Merge pull request #41132 from roidelapluie/bsd
Enable client on netbsd and dragonfly
2020-06-20 17:47:40 -07:00
Julien Pivotto
87a7fc1ced Enable client on netbsd and dragonfly
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-20 01:32:35 +02:00
Sebastiaan van Stijn
87b8947580
TestDaemonDNSFallback: increase timeout to reduce flakiness
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-18 10:10:30 +02:00
Akihiro Suda
a23ca165c9
Merge pull request #41122 from thaJeztah/bump_x_text
vendor: golang.org/x/text v0.3.3 (CVE-2020-14040)
2020-06-18 15:55:50 +09:00
Tianon Gravi
5ead7ba14b
Merge pull request #41063 from thaJeztah/bump_docker_py
testing: bump docker-py 4.2.1
2020-06-17 16:30:53 -07:00
Sebastiaan van Stijn
3e2965831f
vendor: golang.org/x/text v0.3.3
full diff: https://github.com/golang/text/compare/v0.3.2...v0.3.3

includes a fix for CVE-2020-14040

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-06-17 12:52:46 +02:00
Akihiro Suda
bd5788960a
Merge pull request #41117 from zhipengzuo/master
fix code note when push all tags
2020-06-17 17:44:33 +09:00
Akihiro Suda
5d97de47ec
dockerd-rootless-setuptool.sh: use safer XRD on non-systemd hosts
`/tmp/docker-$(id -u)` is not a good candidate as `$XDG_RUNTIME_DIR`,
because it might be already created by another user.

The new path is `$HOME/.docker/run`.

Cherry-picked from https://github.com/docker/docker-install/pull/178

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-17 12:10:28 +09:00
zhipengzuo
e07a88c95f fix code note when push all tags
Signed-off-by: zhipengzuo <zuozhipeng@baidu.com>
2020-06-16 21:05:10 +08:00
Brian Goff
88241b9989
Merge pull request #41108 from thaJeztah/containerd_userns
use containerd/sys to detect UserNamespaces
2020-06-15 16:48:14 -07:00
Tonis Tiigi
9b28939345 vendor: update buildkit to df35e9818
Update to new buildkit and fix upgrade bugs

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-06-15 09:44:41 -07:00