Commit graph

44723 commits

Author SHA1 Message Date
Bjorn Neergaard
a166d959a0
Merge pull request #44717 from neersighted/backport/44668/23.0
[23.0 backport] api: can marshal and unmarshal when args.fields is empty
2023-01-03 08:43:30 -07:00
Sebastiaan van Stijn
0109eac486
Merge pull request #44736 from crazy-max/23.0_dockerfile-cross
[23.0 backport] Dockerfile: use TARGETPLATFORM to build Docker
2023-01-03 10:42:08 +01:00
CrazyMax
d778bbab84
docs: contributing docs update for cross comp
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 83280d44d0)
2023-01-02 18:46:04 +01:00
CrazyMax
2dd577955c
Dockerfile: add "all" stage to build binaries and extra tools
We still need a stage that build binaries and extra tools as well for
docker-ce-packaging repo: ff110508ff/static/Makefile (L41-L57)

This could be removed if we create a package for each project
like it's done in docker-packaging repo: https://github.com/docker/packaging/tree/main/pkg

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit e8a82ed24d)
2023-01-02 18:46:03 +01:00
CrazyMax
3ef71f9085
ci: add extra steps to check artifacts
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 113e95ec02)
2023-01-02 18:46:03 +01:00
CrazyMax
8fbfc2676f
Dockerfile: rename dev stages
Also remove DEV_IMAGE bake var that is not used

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit b565b496ba)
2023-01-02 18:46:03 +01:00
CrazyMax
7e286efcd3
ci: use GITHUB_REF and GITHUB_SHA to set version and commit
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 27ba1766e7)
2023-01-02 18:46:03 +01:00
CrazyMax
f29fe2daec
bake: define additional vars
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 0b3af098e1)
2023-01-02 18:46:03 +01:00
CrazyMax
3b90bb6ad3
bake: define DESTDIR
Keep the same output dir format in the bake definition
as the one used in make scripts.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 9bcf5bed05)
2023-01-02 18:46:02 +01:00
CrazyMax
171471b613
hack: update buildmode pie condition
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 491467b0b9)
2023-01-02 18:46:02 +01:00
CrazyMax
7d8c689923
hack: do not set buildmode pie for statically linked binary
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 347a5f68da)
2023-01-02 18:46:02 +01:00
CrazyMax
75596bee28
hack: use PKG_CONFIG var when checking libdevmapper
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit e37985f590)
2023-01-02 18:46:02 +01:00
CrazyMax
29758a067f
IAmStatic not used anymore
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 84ea9ee0f9)
2023-01-02 18:46:02 +01:00
CrazyMax
5d4ddce5ed
hack: remove containerutility script
this script is not used anymore. containerutility is
built in the Dockerfile.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 04c90b8cf5)
2023-01-02 18:46:01 +01:00
CrazyMax
a85bdbe1ca
Dockerfile: use TARGETPLATFORM to build Docker
Better support for cross compilation so we can fully rely
on `--platform` flag of buildx for a seamless integration.

This removes unnecessary extra cross logic in the Dockerfile,
DOCKER_CROSSPLATFORMS and CROSS vars and some hack scripts as well.

Non-sandboxed build invocation is still supported and dev stages
in the Dockerfile have been updated accordingly.

Bake definition and GitHub Actions workflows have been updated
accordingly as well.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 8086f40123)
2023-01-02 18:46:01 +01:00
Sebastiaan van Stijn
63e861c87e
Merge pull request #44726 from thaJeztah/23.0_backport_devmapper_simplify_udev_error
[23.0 backport] daemon/graphdriver/devicemapper: simplify Udev log, and update link
2023-01-02 18:09:07 +01:00
Sebastiaan van Stijn
316231cced
daemon/graphdriver/devicemapper: simplify Udev log, and update link
Simplify the error message so that we don't have to distinguish between static-
and non-static builds. Also update the link to the storage-driver section to
use a "/go/" redirect in the docs, as the anchor link was no longer correct.
Using a "/go/" redirect  makes sure the link remains functional if docs is  moving
around.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit a5ebd28797)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-31 17:02:30 +01:00
Akihiro Suda
7bf0572f64
Merge pull request #44724 from thaJeztah/23.0_backport_use_the_osusergo_luke
[23.0 backport] daemon/logger/gcplogs: remove ensureHomeIfIAmStatic workaround
2023-01-01 00:12:14 +09:00
Sebastiaan van Stijn
770ace39d8
daemon/logger/gcplogs: remove ensureHomeIfIAmStatic workaround
This function was added in b86e3bee5a to
work around an issue in os/user.Current(), which SEGFAULTS when compiling
statically with cgo enabled (see golang/go#13470).

We hit similar issues in other parts, and contributed a "osusergo" build-
tag in https://go-review.googlesource.com/c/go/+/330753. The "osusergo"
build tag must be set when compiling static binaries with cgo enabled.
If that build-tag is set, the cgo implementation for user.Current() won't
be used, and a pure-go implementation is used instead;
https://github.com/golang/go/blob/go1.19.4/src/os/user/cgo_lookup_unix.go#L5

With the above in place, we no longer need this workaround, and can remove
the ensureHomeIfIAmStatic() function.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 155e39187c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-31 14:50:43 +01:00
Yamazaki Masashi
5e4464798f
api: can marshal and unmarshal when args.fields is empty
Signed-off-by: Yamazaki Masashi <masi19bw@gmail.com>
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
(cherry picked from commit 5fed968b1d)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>
2022-12-29 15:40:54 -07:00
Akihiro Suda
2b5ec481e7
Merge pull request #44714 from thaJeztah/23.0_backport_carry_44600_update_delve
[23.0 backport] Update delve version
2022-12-30 07:24:15 +09:00
Bjorn Neergaard
045de829e8
Merge pull request #44708 from zhsj/23.0-btrfs-progs-6.1
[23.0 backport] daemon/graphdriver/btrfs: workaround field rename in btrfs-progs 6.1
2022-12-29 14:47:13 -07:00
Sebastiaan van Stijn
8cb02d8c58
Merge pull request #44703 from thaJeztah/23.0_backport_docker_proxy_version_flag
[23.0 backport] cmd/docker-proxy: add "-v / --version" flag
2022-12-29 21:13:44 +01:00
oscar.chen
515219b716
Update delve version
Signed-off-by: oscar.chen <2972789494@qq.com>
(cherry picked from commit ad8804885c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-29 19:13:08 +01:00
Shengjing Zhu
0393897695 daemon/graphdriver/btrfs: workaround field rename in btrfs-progs 6.1
Closes: #44698

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
(cherry picked from commit ffbbe3d103)
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-12-29 21:16:47 +08:00
Sebastiaan van Stijn
7199300239
cmd/docker-proxy: add "-v / --version" flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 12df6024db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-28 08:24:47 +01:00
Sebastiaan van Stijn
4ddde6dde5
Merge pull request #44702 from thaJeztah/23.0_backport_fix_buildkit_ci
[23.0 backport] gha: update buildkit to fix integration tests
2022-12-27 21:54:53 +01:00
Sebastiaan van Stijn
e9075f70c7
gha: update buildkit to fix integration tests
full diff: 0bfcd83e6d...d77361423c

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c42b304f62)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-27 19:23:28 +01:00
Tianon Gravi
cba986b340
Merge pull request #44679 from thaJeztah/23.0_backport_errdefs_improve_debug_logs
[23.0 backport] errdefs: FromStatusCode() don't log "FIXME" debug message
2022-12-21 09:38:50 -08:00
Sebastiaan van Stijn
b2d2f012b4
errdefs: FromStatusCode() don't log "FIXME" debug message
This utility is used by the client, which cannot do anything about errors
received from the API. In situations where no API connection was possible,
for example, if the client has no permissions to connect to the socket,
the request would have a "-1" status-code;
3e39ec60da/client/request.go (L133-L134)

In this case, a client with "debug" enabled, would print _and_ log a confusing
error message:

    DEBU[0000] FIXME: Got an status-code for which error does not match any expected type!!!  error="Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post \"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile.repro&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=repro&target=&ulimits=null&version=1\": dial unix /var/run/docker.sock: connect: permission denied" module=api status_code=-1
    Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile.repro&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=repro&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied

In the above; `DEBU` logs the error (including the "FIXME"), and the second
line is the error message printed.

This was a mistake on my side when I added the `FromStatusCode` utility. I
implemented that to be the counterpart to `FromError`, but in doing so also
copied over the logging (see 1af30c50ca). That
log-message is only intended to be logged on the daemon side, for situations
where we return an error without a proper errdefs (which would result in an
500 "internal server error" to be returned by the API).

This patch removes the debug log, and a minor cleanup to explicitly return
"nil" if we didn't get an error in the first place.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e67c827bb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-20 16:07:07 +01:00
Sebastiaan van Stijn
478f023783
Merge pull request #44675 from thaJeztah/23.0_backport_vendor_containerd_1.6.14
[23.0 backport] vendor: github.com/containerd/containerd v1.6.14
2022-12-20 10:59:36 +01:00
Sebastiaan van Stijn
52c35488a0
Merge pull request #44672 from thaJeztah/23.0__update_containerd_1.6.14
[23.0] update containerd binary to v1.6.14
2022-12-20 10:54:39 +01:00
Sebastiaan van Stijn
9980e64341
vendor: github.com/containerd/containerd v1.6.14
No changes in vendored code, other than the version bump

full diff: https://github.com/containerd/containerd/compare/v1.6.13...v1.6.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 83d7ae76e8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 22:46:07 +01:00
Sebastiaan van Stijn
5ebd78d5f8
update containerd binary to v1.6.14
Notable Updates

- Fix `memory.memsw.limit_in_bytes: no such file or directory` error in CRI plugin

full diff: https://github.com/containerd/containerd/compare/v1.6.13...v1.6.14

See the changelog for complete list of changes:
https://github.com/containerd/containerd/releases/tag/v1.6.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 18:38:04 +01:00
Sebastiaan van Stijn
4b78386a3a
Merge pull request #44655 from thaJeztah/23.0_containerd_binary_1.6.13
[23.0] update containerd binary to v1.6.13
2022-12-16 00:19:03 +01:00
Sebastiaan van Stijn
21c1faed45
Merge pull request #44659 from thaJeztah/23.0_backport_dockerfile_targetplatform
[23.0 backport] Dockerfile: use TARGETPLATFORM
2022-12-16 00:18:27 +01:00
CrazyMax
f6c2f20cee
Dockerfile: delve cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 19f3448c21)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
3d6908c79b
Dockerfile: swagger cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit ed95e1a9ff)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
1dc34e889c
Dockerfile: containerutility cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 879b023706)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
effd7661df
Dockerfile: registry cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 8d9a357a67)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:27 +01:00
CrazyMax
f3e3266373
Dockerfile: dockercli cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit a4bc2922c2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
fd6316e631
Dockerfile: rootlesskit cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 420591c4a2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
fbe4db5be0
Dockerfile: tini cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit f0307892ea)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
CrazyMax
f9a356c7e9
Dockerfile: runc cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 5e19d7ec54)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:26 +01:00
Kevin Alvarez
6e7cc3b7e3
Dockerfile: containerd cross build with TARGETPLATFORM
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 81d704d15d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:59:19 +01:00
CrazyMax
582b29f587
Dockerfile: DOCKER_STATIC arg
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit b19c11621a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:23 +01:00
CrazyMax
daa28fcf2d
Dockerfile: add dummy stage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 69c9dfd6d5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:23 +01:00
CrazyMax
4cab584a9c
Dockerfile: add cross compilation helper
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 6cba7d22e9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 22:58:22 +01:00
Sebastiaan van Stijn
1cc21c1b81
Merge pull request #44658 from thaJeztah/23.0_backport_vendor_containerd_1.6.13
[23.0 backport] vendor: github.com/containerd/containerd v1.6.13
2022-12-15 22:36:15 +01:00
Sebastiaan van Stijn
0b12468116
vendor: github.com/containerd/containerd v1.6.13
full diff: https://github.com/containerd/containerd/compare/v1.6.12...v1.6.13

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 35cbdc9661)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 19:36:58 +01:00