Commit graph

46328 commits

Author SHA1 Message Date
Paweł Gronowski
3029f554cc
c8d/readConfig: Translate c8d NotFound to errdefs
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 7379d18018)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-28 09:49:02 +02:00
Sebastiaan van Stijn
b76ffecee8
Merge pull request #46061 from vvoland/integration-no-fail-fast-24
[24.0 backport] hack/integration: Add TEST_INTEGRATION_FAIL_FAST
2023-07-24 20:54:12 +02:00
Bjorn Neergaard
96a2b214cb
Merge pull request #46045 from thaJeztah/24.0_backport_bump_buildkit_0.11
[24.0 backport] vendor: github.com/moby/buildkit v0.11.7-dev
2023-07-24 09:27:46 -06:00
Paweł Gronowski
35a8b00b18
hack/integration: Add TEST_INTEGRATION_FAIL_FAST
Before this change, integration test would fail fast and not execute all
test suites when one suite fails.
Change this behavior into opt-in enabled by TEST_INTEGRATION_FAIL_FAST
variable.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 48cc28e4ef)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-24 17:05:44 +02:00
Sebastiaan van Stijn
fed26d5b3c
vendor: github.com/moby/buildkit v0.11.7-dev
full diff: 0a15675913...616c3f613b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0ec73a7892)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-24 16:14:03 +02:00
Bjorn Neergaard
a61e2b4c9c
Merge pull request #46044 from neersighted/init_cleanup_24.0
[24.0 backport] Upstart & sysvinit cleanup
2023-07-21 12:06:26 -06:00
Tianon Gravi
eede7f09c7
Remove Upstart scripts
Upstart has been EOL for 8 years and isn't used by any distributions we support any more.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
(cherry picked from commit 0d8087fbbc)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-21 11:00:50 -06:00
Tianon Gravi
907f838603
Remove Upstart and cgroups bits from Debian sysvinit script
Upstart has been EOL for 8 years and isn't used by any distributions we support any more.

Additionally, this removes the "cgroups v1" setup code because it's more reasonable now for us to expect something _else_ to have set up cgroups appropriately (especially cgroups v2).

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
(cherry picked from commit ae737656f9)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-21 11:00:40 -06:00
Sebastiaan van Stijn
52c92be4c5
Merge pull request #46029 from thaJeztah/24.0_backport_bump_runc_binary_1.1.8
[24.0 backport] Dockerfile: update runc binary to v1.1.8
2023-07-19 19:18:38 +02:00
Sebastiaan van Stijn
f022632503
Dockerfile: update runc binary to v1.1.8
release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.8
full diff: https://github.com/opencontainers/runc/compare/v1.1.7...v1.1.9

This is the eighth patch release of the 1.1.z release branch of runc.
The most notable change is the addition of RISC-V support, along with a
few bug fixes.

- Support riscv64.
- init: do not print environment variable value.
- libct: fix a race with systemd removal.
- tests/int: increase num retries for oom tests.
- man/runc: fixes.
- Fix tmpfs mode opts when dir already exists.
- docs/systemd: fix a broken link.
- ci/cirrus: enable some rootless tests on cs9.
- runc delete: call systemd's reset-failed.
- libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.
- CI: bump Fedora, Vagrant, bats.
- .codespellrc: update for 2.2.5.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit df86d855f5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 18:22:48 +02:00
Sebastiaan van Stijn
bd41493132
Merge pull request #46023 from thaJeztah/24.0_backport_bump_buildx
[24.0 backport] Dockerfile: update buildx to v0.11.2
2023-07-19 16:58:47 +02:00
Sebastiaan van Stijn
5164e5f6d6
Merge pull request #46025 from vvoland/c8d-inspect-variant-24
[24.0 backport] c8d/inspect: Include platform Variant
2023-07-19 15:33:46 +02:00
Sebastiaan van Stijn
2b2a72cc65
Merge pull request #46021 from thaJeztah/24.0_backport_c8d-image-save-lease
[24.0 backport] c8d: Make sure the content isn't removed while we export
2023-07-19 13:06:14 +02:00
Paweł Gronowski
98a6422cbc
c8d/inspect: Include platform Variant
Variant was mistakenly omitted in the returned V1Image.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 2659f7f740)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-19 13:06:11 +02:00
Sebastiaan van Stijn
aab94fb340
Dockerfile: update buildx to v0.11.2
Update the BUILDX_VERSION :)

release notes:

- https://github.com/docker/buildx/releases/tag/v0.11.1
- https://github.com/docker/buildx/releases/tag/v0.11.2

full diff: https://github.com/docker/buildx/compare/v0.11.0...v0.11.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d78893921a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 13:04:31 +02:00
Djordje Lukic
1be48ec553
c8d: Make sure the content isn't removed while we export
This change add leases for all the content that will be exported, once
the image(s) are exported the lease is removed, thus letting
containerd's GC to do its job if needed. This fixes the case where
someone would remove an image that is still being exported.

This fixes the TestAPIImagesSaveAndLoad cli integration test.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
(cherry picked from commit f3a6b0fd08)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 11:57:49 +02:00
Sebastiaan van Stijn
d4a26c1530
Merge pull request #46013 from vvoland/c8d-resolve-fix-digested-and-named-24
[24.0 backport] c8d/resolveImage: Fix Digested and Named reference
2023-07-19 00:12:49 +02:00
Bjorn Neergaard
d63f7fb201
Merge pull request #46010 from thaJeztah/24.0_backport_buildkit_ref_replace
[24.0 backport] ci: extract buildkit version correctly with replace-d modules
2023-07-18 13:14:04 -06:00
Sebastiaan van Stijn
4f0747b0df
Merge pull request #46014 from vvoland/c8d-inspect-fix-duplicate-digested-24
[backport 24.0] c8d/inspect: Don't duplicate digested ref
2023-07-18 20:19:57 +02:00
Bjorn Neergaard
ff0144de3b
ci(buildkit): remove early-return from buildkit-ref
This doesn't really make sense now that this script returns a
$GITHUB_ENV snippet.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 7310a7cd0c)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-18 12:11:56 -06:00
Bjorn Neergaard
a936ae7e98
ci(buildkit): remove misleading code from buildkit-ref
Post-f8c0d92a22bad004cb9cbb4db704495527521c42, BUILDKIT_REPO doesn't
really do what it claims to. Instead, don't allow overloading since the
import path for BuildKit is always the same, and make clear the
provenance of values when generating the final variable definitions.

We also better document the script, and follow some best practices for
both POSIX sh and Bash.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 4ecc01f3ad)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-18 12:11:55 -06:00
Bjorn Neergaard
4c29864b02
hack/with-go-mod.sh: warn on stderr
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 48ff8a95cc)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-18 12:11:54 -06:00
Paweł Gronowski
3c5c192baf
c8d/resolveImage: Fix Digested and Named reference
When resolving a reference that is both a Named and Digested, it could
be resolved to an image that has the same digest, but completely
different repository name.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 48fc306764fc5c39d4284021520a0337ef7e0cb0)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-18 18:02:36 +02:00
Paweł Gronowski
572de8764e
c8d/inspect: Don't duplicate digested ref
If image name is already an untagged digested reference, don't produce
additional digested ref.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 028eab9ebb)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-18 17:48:35 +02:00
Justin Chadwell
5dded3340c
ci: extract buildkit version correctly with replace-d modules
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit f8c0d92a22)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-18 15:23:57 +02:00
Sebastiaan van Stijn
8b24eea65e
Merge pull request #45990 from thaJeztah/24.0_backport_hijack_share_request_builder
[24.0 backport] client: Client.postHijacked: use Client.buildRequest
2023-07-18 15:05:20 +02:00
Sebastiaan van Stijn
8ab6d025f6
Merge pull request #46001 from thaJeztah/24.0_backport_notestyourself
[24.0 backport] quota: remove gotest.tools from testhelpers
2023-07-18 10:24:21 +02:00
Sebastiaan van Stijn
bd1ae65aab
quota: remove gotest.tools from testhelpers
gotest.tools has an init() which registers a '-update' flag;
a80f057529/internal/source/update.go (L21-L23)

The quota helper contains a testhelpers file, which is meant for usage
in (integration) tests, but as it's in the same pacakge as production
code, would also trigger the gotest.tools init.

This patch removes the gotest.tools code from this file.

Before this patch:

    $ (exec -a libnetwork-setkey "$(which dockerd)" -help)
    Usage of libnetwork-setkey:
      -exec-root string
            docker exec root (default "/run/docker")
      -update
            update golden values

With this patch applied:

    $ (exec -a libnetwork-setkey "$(which dockerd)" -help)
    Usage of libnetwork-setkey:
      -exec-root string
            docker exec root (default "/run/docker")

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 1aa17222e7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-17 23:12:28 +02:00
Sebastiaan van Stijn
2e3f3fd1e0
Merge pull request #45998 from neersighted/backport/45997/24.0
[24.0 backport] Build system grab-bag
2023-07-17 20:19:50 +02:00
Bjorn Neergaard
544032f7a4
hack/d/cli.sh: properly handle errors in curl
Add `-f` to output nothing to tar if the curl fails, and `-S` to report
errors if they happen.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 780e8b2332)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-17 11:23:13 -06:00
Bjorn Neergaard
0df2e1bdd8
Dockerfile: improve CLI/rootlesskit caching
Use bind-mounts instead of a `COPY` for cli.sh, and use `COPY --link`
for rootlesskit's build stage.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 12a19dcd84)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-17 11:23:12 -06:00
Bjorn Neergaard
05f82fdd00
Dockerfile(.simple): align APT_MIRROR support
Use a non-slash escape sequence to support mirrors with a path
component, and do not unconditionally replace the mirror in
Dockerfile.simple.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit 235cd6c6b2)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-17 11:23:11 -06:00
Bjorn Neergaard
151686a5c8
Makefile: pass through APT_MIRROR
This aligns `docker build` as invoked by the Makefile with both `docker
buildx bake` as invoked by the Makefile and directly by the user.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit bcea83ab9b)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-17 11:23:10 -06:00
CrazyMax
31567e0973
Dockerfile: use default apt mirrors
Use default apt mirrors and also check APT_MIRROR
is set before updating mirrors.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit a1d2132bf6)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-17 11:23:05 -06:00
Sebastiaan van Stijn
d94f2dcab2
client: Client.postHijacked: use Client.buildRequest
Use Client.buildRequest instead of a local copy of the same logic so
that we're using the same logic, and there's less chance of diverging.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c219b09d4a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-17 09:41:41 +02:00
Sebastiaan van Stijn
bff68bf2cc
client: Client.setupHijackConn: explicitly ignore errors
Just making my IDE and some linters slightly happier.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit e11555218b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-17 09:41:41 +02:00
Sebastiaan van Stijn
8443a06149
Merge pull request #45974 from thaJeztah/24.0_backport_create-overlay-on-non-manager
[24.0 backport] libnet: Return proper error when overlay network can't be created
2023-07-17 09:20:55 +02:00
Sebastiaan van Stijn
36e9e796c6
Merge pull request #45976 from thaJeztah/24.0_backport_moby-bin-tags
[24.0 backport] gha: assorted fixes for bin-image
2023-07-15 01:57:25 +02:00
Sebastiaan van Stijn
e916ec1584
Merge pull request #45975 from thaJeztah/24.0_backport_hack-make-run-disable-tls
[24.0 backport] Disable tls when launching dockerd through hack/make.sh
2023-07-15 01:54:01 +02:00
Bjorn Neergaard
eb34c0b6d2
Merge pull request #45970 from thaJeztah/24.0_backport_update_go_1.20.6
[24.0 backport] update go to go1.20.6
2023-07-14 17:32:07 -06:00
Bjorn Neergaard
8bdf6d1baf
ci(bin-image): add SHA-based tags
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
(cherry picked from commit ecfa4f5866)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 01:05:28 +02:00
Kevin Alvarez
26a457e7a3
ci(bin-image): fix meta step
We can't upload the same file in a matrix so generate
metadata in prepare job instead. Also fixes wrong bake meta
file in merge job.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 0a126a85a4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 01:04:43 +02:00
CrazyMax
b9904ba319
ci(bin-image): fix typo
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 749d7449f9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 01:04:33 +02:00
CrazyMax
e7c333cb6e
ci(bin-image): don't set tags when pushing by digest
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 1686540594)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 01:03:17 +02:00
CrazyMax
fcb87e8ae1
ci: push bin image to Docker Hub
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 41261ea4ec)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 01:02:55 +02:00
Albin Kerouanton
68c0cec772
Disable tls when launching dockerd through hack/make.sh
The daemon sleeps for 15 seconds at start up when the API binds to a TCP
socket with no TLS certificate set. That's what the hack/make/run script
does, but it doesn't explicitly disable tls, thus we're experiencing
this annoying delay every time we use this script.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 6b1b71ced4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 00:58:32 +02:00
Albin Kerouanton
738d8417e0
libnet: Return a 403 when overlay network isn't allowed
With this change, the API will now return a 403 instead of a 500 when
trying to create an overlay network on a non-manager node.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit d29240d9eb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 00:51:58 +02:00
Albin Kerouanton
a5c0fda157
libnet: Return proper error when overlay network can't be created
The commit befff0e13f inadvertendly
disabled the error returned when trying to create an overlay network on
a node which is not part of a Swarm cluster.

Since commit e3708a89cc the overlay
netdriver returns the error: `no VNI provided`.

This commit reinstate the original error message by checking if the node
is a manager before calling libnetwork's `controller.NewNetwork()`.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
(cherry picked from commit 21dcbada2d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 00:51:50 +02:00
Sebastiaan van Stijn
deea880581
pkg/jsonmessage: use string-literals for easier grep'ing
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit ec11aea880)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 00:51:38 +02:00
Sebastiaan van Stijn
962a4f434f
pkg/ioutils: use string-literals for easier grep'ing
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fded42c3bd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-15 00:51:28 +02:00