Commit graph

37639 commits

Author SHA1 Message Date
Akihiro Suda
6ed0f6ab78
Merge pull request #40652 from thaJeztah/19.03_backport_fix_backingfs
[19.03 backport] fix backingFs assignment
2020-03-13 04:42:15 +09:00
Brian Goff
100d240d86
Move schema1 deprecation notice
Currently we show this deprecation notice for any error returned by a
registry.
Registries can return an error for any number of reasons.
Instead let's show the deprecation notice only if the fallback was
successful.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 6859bc7eee)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 20:30:57 +01:00
Brian Goff
4a4b3ed37f
Merge pull request #40558 from thaJeztah/19.03_backport_buster_or_bust
[19.03 backport] various dockerfile changes and update to buster variant
2020-03-12 12:22:39 -07:00
Sebastiaan van Stijn
57d5105759
bump windows-container-utility aa1ba87e99b68e0113bd27ec26c60b88f9d4ccd9
full diff: e004a1415a...aa1ba87e99

changes:

- Use standard include paths instead of hard-coding

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5125f8b304)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:21 +01:00
Sebastiaan van Stijn
68db0c1739
Dockerfile: switch to iptables-legacy to match the host
CI runs on Ubuntu 16.04 machines, which use iptables (legacy), but
Debian buster uses nftables. Because of this, DNS resolution does not
work if the daemon configures iptables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit bb0472bd23)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:19 +01:00
Sebastiaan van Stijn
4aaf3ead97
Dockerfile: switch golang image to "buster" variant, and update btrfs packages
The btrfs-tools was a transitional package, and no longer exists:

> Package btrfs-tools
> stretch (oldstable) (admin): transitional dummy package
> 4.7.3-1: amd64 arm64 armel armhf i386 mips mips64el mipsel ppc64el s390x

It must be replaced either by `btrfs-progs` or `libbtrfs-dev` (which has just the development headers)

> Package: libbtrfs-dev (4.20.1-2)
> Checksumming Copy on Write Filesystem utilities (development headers)

Note that the `libbtrfs-dev` package is not available on Debian stretch
(only in stretch-backports)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 4e3ab9e9fb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:17 +01:00
Sebastiaan van Stijn
a070874828
hack/make: ignore failure to stop apparmor
```
 ---> Making bundle: .integration-daemon-stop (in bundles/test-integration)
 ++++ cat bundles/test-integration/docker.pid
 +++ kill 13137
 +++ /etc/init.d/apparmor stop
 Leaving: AppArmorNo profiles have been unloaded.

 Unloading profiles will leave already running processes permanently
 unconfined, which can lead to unexpected situations.

 To set a process to complain mode, use the command line tool
 'aa-complain'. To really tear down all profiles, run 'aa-teardown'."

script returned exit code 255
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5dbfae6949)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:15 +01:00
Sebastiaan van Stijn
237843a059
Dockerfile: align consecutive COPY lines
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 93edf327dc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:13 +01:00
Sebastiaan van Stijn
400b2850ff
Dockerfile: order COPY lines by change frequency
Ordering the COPY lines to optimize for layer sharing
when these dependencies are updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8edbe5dec2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:11 +01:00
Sebastiaan van Stijn
ddfeaf32ff
Dockerfile: sort packages alphabetically
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ee0ef6c535)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:09 +01:00
Sebastiaan van Stijn
cb813faebf
Dockerfile: use build-arg for vpnkit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1cfcce5e21)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:07 +01:00
Sebastiaan van Stijn
0499db23d1
Dockerfile: use spaces for indentation
Indenting with tabs can cause the formatting to go wonky,
because the first line of any command is "indented" with spaces,
but following lines are not, therefore they can be mis-aligned with
the first line.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a42b4144bc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:05 +01:00
Sebastiaan van Stijn
c77e7cb3d0
[19.03] Dockerfile: move CRIU_VERSION lower
Match the position with where it's on master after the
Dockerfile buildkit refactor.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:03 +01:00
Sebastiaan van Stijn
c6511ee4db
bump vndr v0.1.1
full diff: https:/github.com/LK4D4/vndr/compare/v0.1.0...v0.1.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 486161a63a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:49:01 +01:00
Sebastiaan van Stijn
0fa8a0c575
bump vndr v0.1.0 to support versioned import paths
With this change, go packages/modules that use versioned
import paths (github.com/foo/bar/v2), but don't use a directory
in the repository, can now be supported.

For example:

```
github.com/coreos/go-systemd/v22 v22.0.0
```

will vendor the github.com/coreos/go-systemd repository
into `vendor/github.com/coreos/go-systemd/v22`.

full diff: f5ab8fc5fb...v0.1.0

- LK4D4/vndr#83 migrate bitbucket to api 2.0
    - fixes LK4D4/vndr#82 https://api.bitbucket.org/1.0/repositories/ww/goautoneg: 410 Gone
- LK4D4/vndr#86 Replace sort.Sort with sort.Strings
- LK4D4/vndr#87 support `github.com/coreos/go-systemd/v22`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d4f05c168d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:48:59 +01:00
Justen Martin
f3009e2f51
Use build args to override binary commits in dockerfile
Signed-off-by: Justen Martin <jmart@the-coder.com>
(cherry picked from commit 095ca77f48)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:48:57 +01:00
Sebastiaan van Stijn
92ca652fc9
Revert "dockerfile: update vndr to 85886e1a"
This reverts commit 0d4f412ecd.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:48:50 +01:00
Kir Kolyshkin
fdad16840c
go-swagger: fix panic
This is an attempt to fix go-swagger panic under Golang 1.13.

Details:
 * https://github.com/go-openapi/jsonpointer/pull/4
 * https://github.com/go-swagger/go-swagger/pull/2059

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 93f9b902af)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:48:44 +01:00
Sebastiaan van Stijn
075e057de5
Dockerfile: set GO111MODULE=off
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 961119db21)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-12 18:48:42 +01:00
Tonis Tiigi
aa6a9891b0 vendor: add local copy of archive/tar
This version avoids doing name lookups on creating tarball that
should be avoided in to not hit loading glibc shared libraries.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-09 21:45:05 +00:00
Tonis Tiigi
0d4f412ecd dockerfile: update vndr to 85886e1a
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-03-09 21:45:05 +00:00
Jintao Zhang
fe2a25a785
fix backingFs assignment
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
(cherry picked from commit 18c22f5bc1)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-09 18:40:20 +01:00
Ethan Mosbaugh
e6c9e2736f Fix rate limiting for logger, increase refill rate
Signed-off-by: Ethan Mosbaugh <ethan@replicated.com>
(cherry picked from commit 50c6a5fb07)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-03-05 09:05:04 -08:00
Akihiro Suda
71373c6105
Merge pull request #40604 from thaJeztah/19.03_backport_mis_unlock
[19.03 backport] daemon/cluster: add a missing Unlock
2020-02-29 10:37:35 +09:00
Sebastiaan van Stijn
498fbecafd
Merge pull request #40476 from cpuguy83/19.03_fix_exec_id_client
[19.03] Exec inspect field should be "ID" not "ExecID"
2020-02-28 22:23:26 +01:00
Brian Goff
5101ce52ae
Merge pull request #40461 from AkihiroSuda/cherrypick-40243-1903
[19.03 backport] Use certs.d from XDG_CONFIG_HOME when in rootless mode (fixes #40236)
2020-02-28 11:17:39 -08:00
Ziheng Liu
1e3971d556
daemon/cluster: add a missing Unlock
Signed-off-by: Ziheng Liu <lzhfromustc@gmail.com>
(cherry picked from commit 83c0bedba9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-28 19:10:14 +01:00
Sebastiaan van Stijn
bb19f8cc90
Merge pull request #40566 from thaJeztah/19.03_backport_bump_grpc
[19.03 backport] bump google.golang.org/grpc v1.23.1
2020-02-28 18:17:14 +01:00
Sebastiaan van Stijn
a18dd2e48e
Merge pull request #40586 from thaJeztah/19.03_revert_jenkinsfile_pin_older_windows
[19.03] Revert "Jenkinsfile: temporarily pin windows image to 10.0.17763.973"
2020-02-26 17:45:58 +01:00
Sebastiaan van Stijn
eb7bd90a57
Revert "Jenkinsfile: temporarily pin windows image to 10.0.17763.973"
This reverts commit c694d60364.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 16:27:45 +01:00
Dmitry Sharshakov
a2d887b6f5 Use certs.d
from XDG_CONFIG_HOME
 when in rootless mode

Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
(cherry picked from commit f4fa98f583)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-02-26 16:50:59 +09:00
Sebastiaan van Stijn
0594484041
Merge pull request #40575 from thaJeztah/19.03_backport_unify_apis
[19.03 backport] docs: add API versions v1.25 - v1.29, v1.38 - v1.40
2020-02-25 12:40:36 +01:00
Sebastiaan van Stijn
cb5a2beaff
docs: add API versions v1.25 - v1.29, v1.38 - v1.40
Adding separate documents for older API versions, so that these don't have to
be collected from each tag/release branch:

- v1.40 - docker v19.03
- v1.39 - docker v18.09
- v1.38 - docker v18.06
- v1.29 - docker v17.05
- v1.28 - docker v17.04
- v1.27 - docker v17.03
- v1.26 - docker v1.13.1
- v1.25 - docker v1.13.0

Note that:

- API versions v1.30 - v1.37 are yet to be added after the tags and release-
  branches from the docker/docker-ce mono-repo have been extracted.
- docker v1.13.0 made the switch from using a markdown file to using swagger
  to document the API.

Approach taken:

    git mv api/swagger.yaml api/swagger-current.yaml

    git checkout upstream/19.03 -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.40.yaml

    git checkout v18.09.9 -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.39.yaml

    git checkout v18.06.3-ce -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.38.yaml

    git checkout v17.05.0-ce -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.29.yaml

    git checkout v17.04.0-ce -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.28.yaml

    git checkout v17.03.2-ce -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.27.yaml

    git checkout v1.13.1 -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.26.yaml

    git checkout v1.13.0 -- api/swagger.yaml
    git mv api/swagger.yaml docs/api/v1.25.yaml

    git mv api/swagger-current.yaml api/swagger.yaml

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6fdbc50084)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-25 10:52:59 +01:00
Akihiro Suda
ad2c5440b5
Merge pull request #40477 from cpuguy83/19.03_40446_check_other_mounts
[19.03] Check tmpfs mounts before create anon volume
2020-02-25 09:41:24 +09:00
Akihiro Suda
a515a320f2
Merge pull request #40547 from thaJeztah/19.03_backport_update_selinux_v1.3.1
[19.03 backport] vendor: update opencontainers/selinux v1.3.1
2020-02-25 09:40:40 +09:00
Akihiro Suda
56399cdacf
Merge pull request #40560 from thaJeztah/19.03_backport_33434_api_doc_base64url
[19.03 backport] Update API docs to specify using base64url
2020-02-25 09:40:17 +09:00
Sebastiaan van Stijn
5e6469c088
Merge pull request #40557 from thaJeztah/19.03_bump_buildkit_v0.6.4
[19.03] vendor: update buildkit v0.6.4
2020-02-24 18:00:53 +01:00
Brian Goff
679115602f
Merge pull request #40555 from fuweid/cp1903-40137
[19.03 backport] daemon: add grpc.WithBlock option
2020-02-22 07:26:04 -08:00
Sebastiaan van Stijn
ce1b8c8c93
bump google.golang.org/grpc v1.23.1
full diff: https://github.com/grpc/grpc-go/compare/v1.23.0...v1.23.1

- grpc/grpc-go#3018 server: set and advertise max frame size of 16KB
- grpc/grpc-go#3017 grpclb: fix deadlock in grpclb connection cache
    - Before the fix, if the timer to remove a SubConn fires at the
      same time NewSubConn cancels the timer, it caused a mutex leak
      and deadlock.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 39ad39d220)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 16:11:05 +01:00
Arko Dasgupta
911ecc3376
Set the bip network value as the subnet
Dont assign the --bip value directly to the subnet
for the default bridge. Instead use the network value
from the ParseCIDR output

Addresses: https://github.com/moby/moby/issues/40392

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit f800d5f786)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 16:04:43 +01:00
Sebastiaan van Stijn
08420b1c95
AppArmor: add missing rules for running in userns
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 404d87ec69)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 15:59:47 +01:00
Sebastiaan van Stijn
fbb08f525f
AppArmor: remove rules for linkgraph.db SQLite database
Commit 0f9f99500c removed the
use of SQLite for managing container links, and commit
f8119bb7a7 removed the migration
tool, and SQLite dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e553a03627)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 15:59:35 +01:00
Brian Goff
1a830501b7
Use FILE_SHARE_DELETE for log files on Windows.
This fixes issues where one goroutine tries to delete or rename a file
while another goroutine has the file open (e.g. a log reader).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit a5f237c2b5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 15:55:03 +01:00
Yong Tang
dcae74c44a
Fix docker crash when creating namespaces with UID in /etc/subuid and /etc/subgid
This fix tries to address the issue raised in 39353 where
docker crash when creating namespaces with UID in /etc/subuid and /etc/subgid.

The issue was that, mapping to `/etc/sub[u,g]id` in docker does not
allow numeric ID.

This fix fixes the issue by probing other combinations (uid:groupname, username:gid, uid:gid)
when normal username:groupname fails.

This fix fixes 39353.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit f09dc2f4fc)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 15:46:55 +01:00
Mike Bush
0349167554
Fixes #33434 - API docs to specify using base64url
Specify base64url rather than base64. Also correct other links to the base64url section of RFC4648

Signed-off-by: Mike Bush <mpbush@gmail.com>
(cherry picked from commit f282dde877)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 15:29:42 +01:00
Sebastiaan van Stijn
b47f177f20
vendor: update buildkit v0.6.4
full diff: 57e8ad5217...v0.6.4

- buildkit#1374 [v0.6] ops: fix deadlock on releasing shared mounts
    - backport of buildkit#1355 ops: fix deadlock on releasing shared mounts
    - fixes buildkit#1322 Deadlock on cache mounts

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-22 12:28:37 +01:00
Wei Fu
9ed0504592 daemon: add grpc.WithBlock option
WithBlock makes sure that the following containerd request is reliable.

In one edge case with high load pressure, kernel kills dockerd, containerd
and containerd-shims caused by OOM. When both dockerd and containerd
restart, but containerd will take time to recover all the existing
containers. Before containerd serving, dockerd will failed with gRPC
error. That bad thing is that restore action will still ignore the
any non-NotFound errors and returns running state for
already stopped container. It is unexpected behavior. And
we need to restart dockerd to make sure that anything is OK.

It is painful. Add WithBlock can prevent the edge case. And
n common case, the containerd will be serving in shortly.
It is not harm to add WithBlock for containerd connection.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit 9f73396dab)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-02-22 14:28:28 +08:00
Sebastiaan van Stijn
1a7d601a15
Merge pull request #40549 from cpuguy83/19.03_stats_use_cond_var
[19.03 backport] Use condition variable to wake stats collector.
2020-02-22 02:29:23 +01:00
Tibor Vass
eee88a2a23
Merge pull request #40551 from thaJeztah/19.03_backport_jenkinsfile_pin_older_windows
[19.03 backport] Jenkinsfile: temporarily pin windows image to 10.0.17763.973
2020-02-21 15:45:04 -08:00
Sebastiaan van Stijn
c694d60364
Jenkinsfile: temporarily pin windows image to 10.0.17763.973
The latest `ltsc2019` image (`10.0.17763.1039`) appear to be broken,
and even a `RUN Write-Host hello` hangs.

Temporarily switching back to an older version so that CI doesn't fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fa2417984b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-21 09:25:09 +01:00