Compare commits

...

1150 Commits

Author SHA1 Message Date
Paweł Gronowski 73be86c91f
Merge pull request #1239 from glours/bump-compose-v2.39.2
bump Compose to version v2.39.2
2025-08-08 16:20:51 +00:00
Guillaume Lours 8ffc15d0f7
bump Compose to version v2.39.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-08-08 18:08:10 +02:00
Paweł Gronowski 1abc619d7a
Merge pull request #1238 from austinvazquez/update-golang-1.24.6
update to go1.24.6
2025-08-08 15:09:44 +00:00
Austin Vazquez 04daa4c3dd
update to go1.24.6
- https://github.com/golang/go/issues?q=milestone%3AGo1.24.6+label%3ACherryPickApproved
- full diff: golang/go@go1.24.5...go1.24.6

View the release notes for more information:
https://go.dev/doc/devel/release#go1.24.6

Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-08 09:26:55 -05:00
Paweł Gronowski ef4fe54e60
Merge pull request #1236 from austinvazquez/bump-containerd-minimum-requirement
deb, rpm: set minimum containerd version to 1.7.27
2025-08-06 18:51:13 +00:00
Austin Vazquez 2b43a97656
deb, rpm: set minimum containerd version to 1.7.27
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-06 11:31:16 -05:00
Paweł Gronowski 10f5969ab9
Merge pull request #1235 from vvoland/gomodules
Use Go modules
2025-08-05 12:12:32 +00:00
Paweł Gronowski 24bb2a2ee0
Use Go modules
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-08-05 13:06:18 +02:00
Paweł Gronowski d8ea50d18b
Merge pull request #1234 from glours/bump-compose-v2.39.1
bump Compose to version v2.39.1
2025-07-24 19:24:58 +02:00
Guillaume Lours a11a58e4c9
bump Compose to version v2.39.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-24 19:04:46 +02:00
Paweł Gronowski 0b5f9187a0
Merge pull request #1233 from doringeman/bump-model-cli
Bump Docker Model CLI version to v0.1.36
2025-07-24 16:39:00 +02:00
Dorin Geman 4d5d57f455
Bump Docker Model CLI version to v0.1.36
Include support for `docker model package` without `--push` and a fix for context detection from within WSL2 (https://github.com/docker/model-runner/issues/118). From https://github.com/docker/model-cli/releases/tag/v0.1.36.

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
2025-07-24 17:26:02 +03:00
Paweł Gronowski bc26d528ca
Merge pull request #1232 from glours/bump-compose-v2.39.0
bump Compose to version v2.39.0
2025-07-24 12:24:34 +02:00
Guillaume Lours 67ce0308c3
bump Compose to version v2.39.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-24 10:34:05 +02:00
Sebastiaan van Stijn b83f86828e
Merge pull request #1230 from crazy-max/buildx-0.26.1
update buildx to v0.26.1
2025-07-22 19:32:17 +02:00
CrazyMax be1e8614de
update buildx to v0.26.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-22 18:26:59 +02:00
Paweł Gronowski 63ebc239ef
Merge pull request #1229 from crazy-max/buildx-0.26.0
update buildx to v0.26.0
2025-07-21 17:52:20 +02:00
CrazyMax fc8f54b44d
update buildx to v0.26.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-21 17:39:23 +02:00
Paweł Gronowski 005c100c09
Merge pull request #1228 from doringeman/bump-model-cli
Bump Docker Model CLI version to v0.1.34
2025-07-21 16:13:27 +02:00
Dorin Geman c252e083d5
Bump Docker Model CLI version to v0.1.34
Includes multiline support in the chat, improved pull messages, show untagged and removed information on `rm`, allow implicit registry on `tag` and `--backend` tag for `run` and `list`. https://github.com/docker/model-cli/releases/tag/v0.1.34.

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
2025-07-21 14:22:27 +03:00
Paweł Gronowski 18e4b1904f
Merge pull request #1227 from doringeman/bump-model-cli
Bump Docker Model CLI version to v0.1.33
2025-07-09 14:40:57 +02:00
Dorin Geman d51f5c9eb2
Bump Docker Model CLI version to v0.1.33
This adds support for the USER_AGENT environment variable set by Compose (in conjunction with Compose v2.38.2).

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
2025-07-09 15:24:35 +03:00
Paweł Gronowski 05b21bfadc
Merge pull request #1226 from vvoland/update-go
update to go1.24.5
2025-07-09 01:20:18 +02:00
Paweł Gronowski 0fc1c5c89b
update to go1.24.5
- https://github.com/golang/go/issues?q=milestone%3AGo1.24.5+label%3ACherryPickApproved
- full diff: golang/go@go1.24.4...go1.24.5

This minor releases include 1 security fixes following the security policy:

- cmd/go: unexpected command execution in untrusted VCS repositories

    Various uses of the Go toolchain in untrusted VCS repositories can result in
    unexpected code execution. When using the Go toolchain in directories fetched
    using various VCS tools (such as directly cloning Git or Mercurial repositories)
    can cause the toolchain to execute unexpected commands, if said directory
    contains multiple VCS configuration metadata (such as a '.hg' directory in a Git
    repository). This is due to how the Go toolchain attempts to resolve which VCS
    is being used in order to embed build information in binaries and determine
    module versions.

    The toolchain will now abort attempting to resolve which VCS is being used if it
    detects multiple VCS configuration metadata in a module directory or nested VCS
    configuration metadata (such as a '.git' directoy in a parent directory and a
    '.hg' directory in a child directory). This will not prevent the toolchain from
    building modules, but will result in binaries omitting VCS related build
    information.

    If this behavior is expected by the user, the old behavior can be re-enabled by
    setting GODEBUG=allowmultiplevcs=1. This should only be done in trusted
    repositories.

    Thanks to RyotaK (https://ryotak.net) of GMO Flatt Security Inc for reporting
    this issue.

    This is CVE-2025-4674 and https://go.dev/issue/74380.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.24.5

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-08 22:51:51 +02:00
Sebastiaan van Stijn 039f6d8a14
Merge pull request #1225 from glours/bump-compose-v2.38.2
bump compose to version v2.38.2
2025-07-08 14:03:55 +02:00
Sebastiaan van Stijn f30d6a5147
Merge pull request #1224 from vvoland/extract-distros
Extract distros
2025-07-08 12:16:36 +02:00
Guillaume Lours 4a0cbbfb1b
bump compose to version v2.38.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-08 11:41:48 +02:00
Paweł Gronowski 4348b58cfe
ci: Run other arches
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-04 17:41:36 +02:00
Paweł Gronowski f55c3bb0b2 distros: Add RHEL
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-04 17:20:34 +02:00
Paweł Gronowski 98d7e35c6b Extract distros to a json file
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-04 17:20:34 +02:00
Sebastiaan van Stijn 42f1151c39
Merge pull request #1223 from vvoland/remove-ltdl
rpm/deb: remove libtool-ltdl build dependency
2025-07-04 16:10:59 +02:00
Paweł Gronowski f0abc2fa92
rpm/deb: remove libtool-ltdl build dependency
The Docker CLI no longer requires libtool-ltdl as a build dependency.

Previously it was an indirect dependency introduced by pkcs11, but it's
no longer needed after:
cb3e55bf58

This patch removes these dependencies from both the Debian control file
and RPM spec files.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-07-04 13:41:33 +02:00
Sebastiaan van Stijn a9021de512
Merge pull request #1222 from xenoscopic/bump-model-cli-v0.1.31
Bump Docker Model CLI version to v0.1.32
2025-07-02 18:33:55 +02:00
Sebastiaan van Stijn e46dc4565a
Merge pull request #1221 from glours/bump-compose-v2.38.1
bump compose to version v2.38.1
2025-07-02 01:15:28 +02:00
Jacob Howard e601f3c783
Bump Docker Model CLI version to v0.1.32
This brings support for the new top-level models: key in Compose (in
conjunction with Compose v2.38.1).

Signed-off-by: Jacob Howard <jacob.howard@docker.com>
2025-07-01 10:02:26 -06:00
Guillaume Lours 9e8a71eeed
bump compose to version v2.38.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-06-30 22:10:01 +02:00
Sebastiaan van Stijn ae713afec1
Merge pull request #1220 from glours/bump-compose-v2.37.3
bump compose to version v2.37.3
2025-06-24 16:32:14 +02:00
Guillaume Lours 90e50e5240
bump compose to version v2.37.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-06-24 16:07:08 +02:00
Paweł Gronowski bf939f570f
Merge pull request #1219 from ndeloof/compose-v2.37.2
bump compose to v2.37.2
2025-06-20 16:24:44 +00:00
Nicolas De Loof e575faa6e0
bump compose to v2.37.2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-06-20 15:26:33 +02:00
Sebastiaan van Stijn 450107245c
Merge pull request #1218 from xenoscopic/model-plugin-v0.1.30
bump Model version to v0.1.30
2025-06-19 14:49:21 +02:00
Sebastiaan van Stijn ea39c43327
Merge pull request #1217 from jsternberg/buildx-0.25.0
update buildx to v0.25.0
2025-06-19 01:01:03 +02:00
Jacob Howard f032c73017
bump Model version to v0.1.30
This fixes two issues with Compose model providers.

Signed-off-by: Jacob Howard <jacob.howard@docker.com>
2025-06-18 16:56:38 -06:00
Jonathan A. Sternberg 074530f1e7
update buildx to v0.25.0
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-06-17 13:38:20 -05:00
Paweł Gronowski 58a87370cf
Merge pull request #1216 from xenoscopic/model-plugin-v0.1.29
bump Model version to v0.1.29
2025-06-17 09:32:38 +00:00
Jacob Howard c19ad2150c
bump Model version to v0.1.29
Signed-off-by: Jacob Howard <jacob.howard@docker.com>
2025-06-16 14:43:07 -06:00
Sebastiaan van Stijn 06077c3ddc
Merge pull request #1213 from vvoland/update-go
update to go1.24.4
2025-06-13 13:20:43 +02:00
Paweł Gronowski 1e6d668d1c
Merge pull request #1214 from glours/bump-compose-v2.37.1
bump compose version to v2.37.1
2025-06-12 09:34:31 +00:00
Guillaume Lours 964b203cca
bump compose version to v2.37.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-06-12 11:04:07 +02:00
Paweł Gronowski fe6c71bdfc
update to go1.24.4
- https://github.com/golang/go/issues?q=milestone%3AGo1.24.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.24.3...go1.24.4

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-06-06 19:38:38 +02:00
Sebastiaan van Stijn 6b1c6b9542
Merge pull request #1212 from tianon/buildx-w
Add `-w` to buildx ldflags
2025-06-05 23:54:17 +02:00
Tianon Gravi db7bac9d9a Add `-w` to buildx ldflags
This disables DWARF generation, which dramatically decreases the size of the binary.

Notably, this does *not* include `-s` which disables the symbol table, as doing so would *also* make it so that `govulncheck` cannot be run on the resulting binary with meaningful results.

Before is ~90M and after is ~72M.

If we add `-s` as well, that ~72M drops to ~63M, but we also lose `govulncheck` so again, IMO, that's not worth doing.

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2025-06-05 14:08:08 -07:00
Sebastiaan van Stijn ebea3ad268
Merge pull request #1211 from glours/bump-compose-v2.37.0
bump compose version to v2.37.0
2025-06-05 18:33:14 +02:00
Guillaume Lours d0808b16e6
bump compose version to v2.37.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-06-05 17:12:38 +02:00
Paweł Gronowski c911c41d58
Merge pull request #1210 from p5/invoke-sysusers-postinstall
fix(all): revert sysusers
2025-05-30 09:32:12 +00:00
Robert Sturla a76bedc0d8
Revert "feat: manage docker group with systemd-sysusers"
This reverts commit 8c5e99fd38.

Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-05-28 20:30:55 +01:00
Paweł Gronowski 875b3d8b76
Merge pull request #1195 from thaJeztah/carry_systemd_sysusers
feat: manage docker group with systemd-sysusers (carry #1187)
2025-05-27 09:34:39 +00:00
Sebastiaan van Stijn 41246eb497
Merge pull request #1206 from vvoland/prtemplate
github: Simplify PR template and adjust changelog section
2025-05-26 13:23:28 +02:00
Paweł Gronowski c886fc882b
Merge pull request #1208 from glours/bump-compose-v2.36.2
bump compose version to v2.36.2
2025-05-26 11:16:47 +00:00
Guillaume Lours 09f7a03b53
bump compose version to v2.36.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-05-23 16:23:38 +02:00
Paweł Gronowski 0761b4db53
Merge pull request #1200 from thaJeztah/remove_ubuntu_20.04
deb: remove ubuntu 20.04 "focal", as it reached EOL
2025-05-22 09:34:53 +00:00
Paweł Gronowski f1cc8e880c
github: Simplify PR template
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-22 10:57:38 +02:00
Paweł Gronowski 1824b05c8e
github: Update PR's template changelog section
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-22 10:55:16 +02:00
Sebastiaan van Stijn a69db2ef0d
deb: remove ubuntu 20.04 "focal", as it reached EOL
Ubuntu 20.04 reached end of support on April 30. There's still commercial
ESM (Extended Security Maintenance) support, but we don't account for that
in our packages; https://ubuntu.com/blog/ubuntu-20-04-eol-for-devicesional

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-22 00:04:08 +02:00
Paweł Gronowski a4107ac3d7
Merge pull request #1205 from crazy-max/buildx-0.24.0
[master] update buildx to v0.24.0
2025-05-21 18:23:12 +00:00
CrazyMax 1b90ce5dd9
update buildx to v0.24.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-21 18:36:21 +02:00
Sebastiaan van Stijn f12e0868ba
Merge pull request #1204 from thaJeztah/bump_ubuntu
Jenkinsfile: update to use Ubuntu 22.04 agents
2025-05-21 15:00:03 +02:00
Paweł Gronowski f4578363dd
Merge pull request #1201 from thaJeztah/remove_fedora_40
remove Fedora 40 (EOL)
2025-05-21 12:48:25 +00:00
Paweł Gronowski d6127368fd
Merge pull request #1198 from thaJeztah/fix_linting
deb: fix lintian errors/warnings for extended descriptions
2025-05-21 12:47:59 +00:00
Sebastiaan van Stijn f71640889f
Jenkinsfile: update to use Ubuntu 22.04 agents
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-21 13:00:38 +02:00
Paweł Gronowski 4880aeb3d5
Merge pull request #1199 from thaJeztah/fix_missing_predepends
deb: add missing pre-depends for init-system-helpers
2025-05-21 09:55:32 +00:00
Paweł Gronowski 67c7b9ea7b
Merge pull request #1203 from thaJeztah/rpm_fix_man_path
rpm: fix install location for docker-ce man-pages
2025-05-21 09:35:17 +00:00
Sebastiaan van Stijn fba2fa3dd4
rpm: fix install location for docker-ce man-pages
commit 3ded61e6d7 moved the man-pages for
dockerd to the docker-ce package, but used the wrong path for installing
them, which resulted in the man-pages being installed in a "man" subdirectory
with.

Before this patch:

    make fedora-42
    rpm -ql ./rpm/rpmbuild/fedora-42/RPMS/aarch64/docker-ce-*.rpm | grep dockerd.8
    /usr/share/man/man/man8/dockerd.8.gz

After this patch:

    make fedora-42
    rpm -ql ./rpm/rpmbuild/fedora-42/RPMS/aarch64/docker-ce-*.rpm | grep dockerd.8
    /usr/share/man/man8/dockerd.8.gz

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-21 11:06:11 +02:00
Robert Sturla 8c5e99fd38
feat: manage docker group with systemd-sysusers
Switches away from the groupadd postinstall commands to managing
the docker group with sysusers.

This is a declarative way to create and manage users, better suited
for the atomic distros such as Silverblue.

Signed-off-by: Robert Sturla <robertsturla@outlook.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-21 10:48:04 +02:00
Paweł Gronowski 5b1a2b65fa
Merge pull request #1193 from xenoscopic/docker-model-update
bump Model version to v0.1.24
2025-05-21 08:02:48 +00:00
Sebastiaan van Stijn c6aefccb10
remove Fedora 40 (EOL)
Fedora 40 reached EOL on May 13, 2025;
https://docs.fedoraproject.org/en-US/releases/eol/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-20 19:47:20 +02:00
Sebastiaan van Stijn 9211ddbfd8
deb: add missing pre-depends for init-system-helpers
Before this patch, lintian would complain about missing pre-depends:

    lintian ./*.deb
    ...
    W: docker-ce: skip-systemd-native-flag-missing-pre-depends (does not satisfy init-system-helpers:any) [postinst:51]
    W: docker-ce: skip-systemd-native-flag-missing-pre-depends (does not satisfy init-system-helpers:any) [prerm:10]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-20 16:05:33 +02:00
Sebastiaan van Stijn dc5c7c1549
deb: fix lintian errors/warnings for extended descriptions
Before this patch, some linting warnings were shown related to the descriptions

    lintian ./*.deb
    ...
    W: docker-ce: extended-description-line-too-long line 5
    W: docker-ce-cli: extended-description-line-too-long line 5
    W: docker-ce-rootless-extras: description-starts-with-leading-spaces line 1
    E: docker-buildx-plugin: extended-description-is-empty
    W: docker-compose-plugin: extended-description-contains-empty-paragraph
    W: docker-model-plugin: extended-description-contains-empty-paragraph

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-20 15:24:35 +02:00
Paweł Gronowski fc7702737d
Merge pull request #1194 from glours/bump-compose-v2.36.1
bump compose version to v2.36.1
2025-05-19 13:04:01 +00:00
Guillaume Lours ce07142058
bump compose version to v2.36.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-05-19 14:28:32 +02:00
Jacob Howard 984aad58a7
bump Model version to v0.1.24
Signed-off-by: Jacob Howard <jacob.howard@docker.com>
2025-05-16 14:21:17 -06:00
Sebastiaan van Stijn 8840a50089
Merge pull request #1190 from xenoscopic/docker-model-packaging
all: add rules for docker-model-plugin packages
2025-05-15 10:10:19 +02:00
Jacob Howard cefea1163b
add rules for docker-model-plugin packages
Docker Model Runner's support for Docker CE is going to require
availability of the docker model command, so this commit adds the new
package by following the mechanisms used by buildx and compose.

Signed-off-by: Jacob Howard <jacob.howard@docker.com>
2025-05-14 10:54:23 -06:00
Paweł Gronowski da7a66a103
Merge pull request #1192 from vvoland/update-go
update to go1.24.3
2025-05-14 07:56:33 +00:00
Paweł Gronowski 7bf1f3b665
update to go1.24.3
- https://go.dev/doc/go1.24
- https://go.dev/doc/devel/release#go1.24.3

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-05-12 13:17:58 +02:00
Sebastiaan van Stijn 5e492795a1
Merge pull request #1189 from glours/bump-compose-v2.36.0
bump compose version to v2.36.0
2025-05-08 13:12:29 +02:00
Guillaume Lours 0f0811088b
bump compose version to v2.36.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-05-07 13:55:49 +02:00
Paweł Gronowski 14fd600fc6
Merge pull request #1185 from crazy-max/buildx-0.23.0
[master] update buildx to v0.23.0
2025-04-18 09:39:18 +00:00
Sebastiaan van Stijn a8e3bba2e8
Merge pull request #1188 from glours/bump-compose-v2.35.1
bump compose version to v2.35.1
2025-04-17 17:01:52 +02:00
Guillaume Lours ec4fb7d49f
bump compose verstion to v2.35.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-04-17 16:31:17 +02:00
CrazyMax 3544c20fd9
update buildx to v0.23.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-15 18:59:46 +02:00
Sebastiaan van Stijn e16f46b858
Merge pull request #1181 from vvoland/debian-trixie
deb: Add Debian "Trixie"
2025-04-11 16:31:34 +02:00
Sebastiaan van Stijn 658fd99c56
Merge pull request #1183 from glours/bump-compose-v2.35.0
bump compose version to v2.35.0
2025-04-10 16:54:55 +02:00
Guillaume Lours 002d0d0a0a
bump compose verstion to v2.35.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-04-10 15:47:11 +02:00
Paweł Gronowski 6364c951ad
deb: Add Debian "Trixie"
Not yet released, but toolchain freeze has been announced
https://lists.debian.org/debian-devel-announce/2025/03/msg00011.html

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-09 12:20:58 +02:00
Paweł Gronowski 8a57ed8b45
Merge pull request #1180 from thaJeztah/bump_golang_1.23.8
[master] update to go1.23.8 (fix CVE-2025-22871)
2025-04-03 11:24:22 +00:00
Sebastiaan van Stijn 5da1429736
update to go1.23.8 (fix CVE-2025-22871)
full diff: https://github.com/golang/go/compare/go1.23.7...go1.23.8
release notes: https://go.dev/doc/devel/release#go1.24.2

go1.23.8 (released 2025-04-01) includes security fixes to the net/http package,
as well as bug fixes to the runtime and the go command. See the Go 1.23.8
milestone on our issue tracker for details;

https://github.com/golang/go/issues?q=milestone%3AGo1.23.8+label%3ACherryPickApproved

From the mailing list:

Hello gophers,

We have just released Go versions 1.24.2 and 1.23.8, minor point releases.
These minor releases include 1 security fixes following the security policy:

- net/http: request smuggling through invalid chunked data
  The net/http package accepted data in the chunked transfer encoding
  containing an invalid chunk-size line terminated by a bare LF.
  When used in conjunction with a server or proxy which incorrectly
  interprets a bare LF in a chunk extension as part of the extension,
  this could permit request smuggling.
  The net/http package now rejects chunk-size lines containing a bare LF.
  Thanks to Jeppe Bonde Weikop for reporting this issue.
  This is CVE-2025-22871 and Go issue https://go.dev/issue/71988.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-03 12:37:37 +02:00
Paweł Gronowski 251aff2f89
Merge pull request #1179 from thaJeztah/gha_updates
gha:  various tweaks
2025-04-02 14:45:08 +00:00
Paweł Gronowski 77669e5c73
Merge pull request #1177 from vvoland/ubuntu-25.04
Jenkinsfile: add Ubuntu 25.04 "Plucky Puffin" (not yet released)
2025-04-02 14:42:34 +00:00
Sebastiaan van Stijn 95b6b1db2b
gha: update to docker/setup-buildx-action@v3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 16:25:39 +02:00
Sebastiaan van Stijn 5bf3dd5df6
gha: update to actions/checkout@v4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 16:25:21 +02:00
Paweł Gronowski 9d43237307
Replace usage of deprecated apt-key
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-02 16:23:57 +02:00
Paweł Gronowski 9d763ff09d
Jenkinsfile: add Ubuntu 25.04 "Plucky Puffin" (not yet released)
Adds the upcoming ubuntu release to start testing builds in CI. This
release is a non-LTS release, and planned to be release on April 17, 2025;

- https://wiki.ubuntu.com/Releases
- https://discourse.ubuntu.com/t/plucky-puffin-release-schedule/36461

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-02 16:23:54 +02:00
Sebastiaan van Stijn 68cea527a1
gha: add guardrails timeouts on all jobs
We had a few "runaway jobs" in other repos, where the job got stuck, and kept
running for 6 hours (in one case even 24 hours, probably due some github
outage). Some of those jobs could not be terminated.

While running these actions on public repositories doesn't cost us, it's
still not desirable to have jobs running for that long (as they can still
hold up the queue).

This patch adds a blanket "1 hour" time-limit. We should look at tweaking
the limit to actually expected duration, but having a default at least is
a start.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 16:20:12 +02:00
Sebastiaan van Stijn 6ac023a72c
gha: add concurrency check
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 16:16:20 +02:00
Sebastiaan van Stijn 50ec2a3b75
gha: set permissions to read-only by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-04-02 16:15:31 +02:00
Sebastiaan van Stijn e11f8c1c77
Merge pull request #1178 from vvoland/gha-distros
ci: Test more distros in GHA workflow
2025-04-02 16:11:12 +02:00
Paweł Gronowski c4c2b021d2
gha/ci: Update runner to ubuntu-24
ubuntu-20 will be removed soon

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-02 14:55:56 +02:00
Paweł Gronowski 0224e5bed5
ci: Test more distros in GHA workflow
Add distros from Jenkinsfile to GHA

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-31 17:33:23 +02:00
Paweł Gronowski fe5019f136
Merge pull request #1169 from p5/fedora-42
feat: enable Fedora 42 packaging
2025-03-28 15:29:25 +00:00
Robert Sturla 0770878603 chore: build Fedora 42 in GitHub Actions CI
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-03-28 09:55:46 +00:00
Robert Sturla fea785d7d0 fix: update binutils workaround to match containerd packaging
Co-authored-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-03-28 09:42:32 +00:00
Sebastiaan van Stijn 7e726fa319
Merge pull request #1175 from crazy-max/buildx-0.22.0
update buildx to v0.22.0
2025-03-18 16:33:17 +01:00
CrazyMax 68558b5663
update buildx to v0.22.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-18 15:31:17 +01:00
Paweł Gronowski a678f42ffb
Merge pull request #1173 from crazy-max/buildx-0.21.3
update buildx to v0.21.3
2025-03-17 18:12:58 +00:00
CrazyMax 86b2c545d3
update buildx to v0.21.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-17 18:27:05 +01:00
Paweł Gronowski 341e90186f
Merge pull request #1172 from glours/bump-compose-v2.34.0
bump compose verstion to v2.34.0
2025-03-14 10:22:06 +00:00
Guillaume Lours 2acb9dbddf
bump compose verstion to v2.34.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-03-14 10:59:19 +01:00
Sebastiaan van Stijn 7bf4649d74
Merge pull request #1171 from vvoland/update-go
update to go1.23.7
2025-03-06 13:30:39 +01:00
Paweł Gronowski 0faee18c86
update to go1.23.7
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.7+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.6...go1.23.7

These minor releases include 1 security fixes following the security policy:

net/http, x/net/proxy, x/net/http/httpproxy: proxy bypass using IPv6 zone IDs

Matching of hosts against proxy patterns could improperly treat an IPv6
zone ID as a hostname component. For example, when the NO_PROXY
environment variable was set to "*.example.com", a request to
"[::1%25.example.com]:80` would incorrectly match and not be proxied.

Thanks to Juho Forsén of Mattermost for reporting this issue.

This is CVE-2025-22870 and Go issue https://go.dev/issue/71984.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.23.7

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-03-04 23:05:45 +01:00
Sebastiaan van Stijn a442459f41
Merge pull request #1170 from crazy-max/buildx-0.21.2
update buildx to v0.21.2
2025-03-03 20:57:59 +01:00
CrazyMax ebad453f35
update buildx to v0.21.2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-03-03 17:34:03 +01:00
Robert Sturla 489ccf578d feat: enable Fedora 42 packaging
Enables docker-ce builds for Fedora 42.  This will be GA in a couple months, and like usual,
has a lifespan of two years.

The workarounds required for Go on ARM are still required on this version, so have
been left in.  The comments are still relevant.

Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2025-02-26 20:18:44 +00:00
Sebastiaan van Stijn d8abe31e7f
Merge pull request #1168 from glours/bump-compose-v2.33.1
bump compose verstion to v2.33.1
2025-02-21 16:57:08 +01:00
Guillaume Lours 38a8224603
bump compose verstion to v2.33.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-02-21 16:21:37 +01:00
Sebastiaan van Stijn d3c8f6ceb5
Merge pull request #1167 from crazy-max/buildx-0.21.1
[master] update buildx to v0.21.1
2025-02-21 15:16:03 +01:00
CrazyMax 866c8f16a0
update buildx to v0.21.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-21 14:27:16 +01:00
Paweł Gronowski cdaf310f79
Merge pull request #1166 from thompson-shaun/update-buildx
[master] bump buildx to v0.21.0
2025-02-19 21:01:48 +00:00
Shaun Thompson 8cbecebe2e
Bump buildx to v0.21.0
Signed-off-by: Shaun Thompson <shaun.thompson@docker.com>
2025-02-19 14:11:59 -05:00
Paweł Gronowski 25aa48b772
Merge pull request #1165 from vvoland/update-buildx
[master] Bump buildx to v0.21.0-rc2
2025-02-17 12:10:31 +00:00
Paweł Gronowski ab5860eab7
Bump buildx to v0.21.0-rc2
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-17 12:52:19 +01:00
Sebastiaan van Stijn 240a045a1f
Merge pull request #1163 from ndeloof/bump_compose_v2.33.0
Bump compose v2.33.0
2025-02-14 18:07:03 +01:00
Nicolas De Loof 6d02ed4647
Bump compose v2.33.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-02-13 09:30:23 +01:00
Paweł Gronowski cf7fc55905
Merge pull request #1161 from vvoland/update-go
[master] update to go1.23.6
2025-02-06 16:12:28 +00:00
Paweł Gronowski d1014916fe
update to go1.23.6
This minor release include 1 security fix following the security policy:

- crypto/elliptic: timing sidechannel for P-256 on ppc64le

  Due to the usage of a variable time instruction in the assembly implementation
  of an internal function, a small number of bits of secret scalars are leaked on
  the ppc64le architecture. Due to the way this function is used, we do not
  believe this leakage is enough to allow recovery of the private key when P-256
  is used in any well known protocols.

This is CVE-2025-22866 and Go issue https://go.dev/issue/71383.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.23.6

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-02-06 16:44:48 +01:00
Sebastiaan van Stijn 90ffcbe8d0
Merge pull request #1159 from thaJeztah/dockerd_manpages
[master] deb,rpm: include dockerd man-page in docker-ce package
2025-01-27 16:52:05 +01:00
Sebastiaan van Stijn 3ded61e6d7
deb,rpm: include dockerd man-page in docker-ce package
When splitting the docker CLI from the moby/moby repository, the dockerd
documentation and man-pages were moved to the CLI repository. This was a
bit of a bad choice, as now the documentation and code lived in separate
repositories, but when the CLI and dockerd packages were split, the man
page for dockerd ended up in the CLI package.

Starting with [moby@d6e9b5f], the dockerd man-page has been reintegrated
into the moby repository, which means that we can build the man-page
from that repository, and remove it from the CLI repository.

This patch updates the packing to do so:

Before this patch;

    dpkg-deb -c docker-ce_0.0.0~20250124134141.b8879a4-1~ubuntu.24.04~noble_arm64.deb | grep -E '^-'
    -rw-r--r-- root/root       642 2025-01-24 14:29 ./etc/default/docker
    -rwxr-xr-x root/root      2946 2025-01-24 14:29 ./etc/init.d/docker
    -rwxr-xr-x root/root   2741336 2025-01-24 19:54 ./usr/bin/docker-proxy
    -rw-r--r-- root/root      1727 2025-01-24 14:29 ./usr/lib/systemd/system/docker.service
    -rw-r--r-- root/root       295 2025-01-24 14:29 ./usr/lib/systemd/system/docker.socket
    -rwxr-xr-x root/root    604336 2025-01-24 19:54 ./usr/libexec/docker/docker-init
    -rw-r--r-- root/root      2248 2025-01-24 14:29 ./usr/share/doc/docker-ce/README.md
    -rw-r--r-- root/root       168 2025-01-24 19:54 ./usr/share/doc/docker-ce/changelog.Debian.gz

    rpm -qpl ./docker-ce-0.0.0~20250124134141.b8879a4-0.fc41.aarch64.rpm
    /etc/docker
    /usr/bin/docker-proxy
    /usr/bin/dockerd
    /usr/lib/systemd/system/docker.service
    /usr/lib/systemd/system/docker.socket
    /usr/libexec/docker/docker-init

With this patch:

    dpkg-deb -c docker-ce_0.0.0~20250124134141.b8879a4-1~ubuntu.24.04~noble_arm64.deb | grep -E '^-'
    -rw-r--r-- root/root       642 2025-01-24 14:29 ./etc/default/docker
    -rwxr-xr-x root/root      2946 2025-01-24 14:29 ./etc/init.d/docker
    -rwxr-xr-x root/root   2741336 2025-01-24 20:55 ./usr/bin/docker-proxy
    -rwxr-xr-x root/root  79458592 2025-01-24 20:55 ./usr/bin/dockerd
    -rw-r--r-- root/root      1727 2025-01-24 14:29 ./usr/lib/systemd/system/docker.service
    -rw-r--r-- root/root       295 2025-01-24 14:29 ./usr/lib/systemd/system/docker.socket
    -rwxr-xr-x root/root    604336 2025-01-24 20:55 ./usr/libexec/docker/docker-init
    -rw-r--r-- root/root      2248 2025-01-24 14:29 ./usr/share/doc/docker-ce/README.md
    -rw-r--r-- root/root       166 2025-01-24 20:55 ./usr/share/doc/docker-ce/changelog.Debian.gz
    -rw-r--r-- root/root      6561 2025-01-24 20:55 ./usr/share/man/man8/dockerd.8.gz

    rpm -qpl ./docker-ce-0.0.0~20250124134141.b8879a4-0.fc41.aarch64.rpm
    /etc/docker
    /usr/bin/docker-proxy
    /usr/bin/dockerd
    /usr/lib/systemd/system/docker.service
    /usr/lib/systemd/system/docker.socket
    /usr/libexec/docker/docker-init
    /usr/share/man/man8/dockerd.8.gz

Given that the dockerd man-page was previously packaged as part of docker-ce-cli,
we need to add a "Replaces:" condition to the package, to prevent dpkg from
detecting it as a conflict when an older version of the docker-ce-cli package
was installed that contains the manpage;

    Unpacking docker-ce (5:0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm) ...
    dpkg: error processing archive ./deb/debbuild/raspbian-bookworm/docker-ce_0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm_armhf.deb (--install):
    trying to overwrite '/usr/share/man/man8/dockerd.8.gz', which is also in package docker-ce-cli 5:0.0.0~20250124134141.b8879a4-1~raspbian.12~bookworm

From the [Debian manual][1]

> 7.6.1. Overwriting files in other packages
>
> It is usually an error for a package to contain files which are on the
> system in another package. However, if the overwriting package declares
> that it Replaces the one containing the file being overwritten, then dpkg
> will replace the file from the old package with that from the new. The
> file will no longer be listed as “owned” by the old package and will be
> taken over by the new package.

[1]: https://www.debian.org/doc/debian-policy/ch-relationships.html
[moby@d6e9b5f]: d6e9b5fe30

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-27 16:19:54 +01:00
Paweł Gronowski 6f3090691d
Merge pull request #1158 from thaJeztah/kmod_suggests
[master] deb, rpm: make kmod "suggests" instead of "recommends"
2025-01-27 15:46:35 +01:00
Sebastiaan van Stijn e755876f21
rpm: adjust spec to account for varying list of man-page sections
The CLI currently builds man-pages for sections 1, 5, and 8, but this
list may change; for example, the dockerd man-page is currently built
from the CLI repository but intended to be removed.

This patch changes the code to check all (1..9) secions, and install the
man-pages found in them.

This patch also updates the %doc and %files section; from the Fedora packaging
guide (see [1]);

> The %files section holds a list of all the files that RPM should install
> from the package. **This list should be exhaustive**, so that the RPM system
> knows exactly what your package installs. There are some options, though,
> to name all the files within a directory to help with packages containing
> hundreds of files.
> (...)
> In addition to naming each file on a line, you can use glob-style wildcards.

But also worth noting that it's NOT needed to mark manpages as %doc, see [2];

> Note also that files installed in %{_mandir} are automatically marked by RPM
> as documentation. Thus it is not necessary to use %doc.

So this patch:

- uses wildcards to enumerate all manpages in all sections
- removes the %doc for manpages, as this is automatic.

[1]: https://jfearn.fedorapeople.org/en-US/RPM/4/html/RPM_Guide/ch09s05.html
[2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-27 14:50:35 +01:00
Sebastiaan van Stijn bb09b29f54
Merge pull request #1150 from Benehiko/cobra-cli-completions
[master] deb,rpm: use cobra generated completions
2025-01-27 10:28:51 +01:00
Sebastiaan van Stijn 940ff3960c
deb, rpm: make kmod "suggests" instead of "recommends"
This was added in deed8d9df8, as the docker
engine depended on modprobe to enable br_netfilter. Docker Engine no longer
requires this since [moby/moby@4b8c720], and [moby/moby@8a8ab0d] (docker\
engine v27.4.1), so we can reduce this to a "suggests"

[moby/moby@4b8c720]: 4b8c72060d
[moby/moby@8a8ab0d]: 8a8ab0d567

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 18:42:15 +01:00
Alano Terblanche 6c19ca1cea
deb,rpm: use cobra generated completions
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
2025-01-24 17:56:21 +01:00
Sebastiaan van Stijn 2f96f03149
Merge pull request #1157 from thaJeztah/nopop
[master]  deb, rpm: reduce uses of "cd", "popd", "pushd"
2025-01-24 17:54:02 +01:00
Sebastiaan van Stijn 61fb900088
deb, rpm: reduce uses of "cd", "popd", "pushd"
For make commands, we can just pass the directory through "-C", and for
"install" we can pass the full path of the source.

There's some remaining uses for targets that build through a script
or using "go build", which may still require changing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 16:16:08 +01:00
Sebastiaan van Stijn 989f44246f
Merge pull request #1154 from thaJeztah/build_cleanups
[master] deb, rpm:  slight refactor / cleanup
2025-01-24 12:24:21 +01:00
Sebastiaan van Stijn f9f36d4945
deb: stop using dh_bash-completion for bash completions
The dh_bash-completion debhelper provides an easy way to install the
shell-completion scripts for Bash. Unfortunately there is no stable
equivalent yet for the other shells (zsh, fish, powershell), which
resulted in two out of three shells requiring manual install.

Given that the installation path for Bash is [well-documented][1],
we can align Bash with the other shells to make this less confusing.

This patch makes that change, and adds a code-comment to outline
the reasoning (and possible future options) for future readers.

[1]: 79fd051907/README.md

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:47:42 +01:00
Sebastiaan van Stijn 59ca4ac5ff
deb: put installing completions in a separate block
Makes it slightly clearer where installing the CLI itself
ends, and where installing completion scripts start.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:38:44 +01:00
Sebastiaan van Stijn 5b91b48be1
deb: consistently use "install -p" (--preserve-timestamps)
This unlikely makes a big difference, as some files may have timestamps
based on checkout date or being generated, but it doesn't hurt doing
either.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 503bad1b88
rpm: consistently use "install -p" (--preserve-timestamps)
This unlikely makes a big difference, as some files may have timestamps
based on checkout date or being generated, but it doesn't hurt doing
either.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 6d05ae6039
rpm: use install -D where possible
The "-D" option creates parent directories if missing; we
can use it in most places, except for one where we're using
wildcards, as installing multiple files requires the target
directory to exist.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:40 +01:00
Sebastiaan van Stijn 9cbbf7a6c1
deb, rpm: use "make dynbinary" instead of ./scripts/build/binary
The "make dynbinary" target calls ./scripts/build/binary with the
right options set, and does not use docker to build (so can be
run as part of our deb/rpm build scripts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-24 10:37:39 +01:00
Sebastiaan van Stijn 0a4c885b7a
Merge pull request #1155 from thaJeztah/obsolete_the_obsolete
rpm: remove Obsoletes for obsolete (selinux) packages
2025-01-24 10:13:37 +01:00
Sebastiaan van Stijn 4608bdfb23
rpm: remove Obsoletes for obsolete (selinux) packages
Remove the obsoletes for `docker-ce-selinux`, `docker-engine-selinux`, and
`docker-engine`.

These were obsoleted in 2017 through 94943b4752

> Mark docker-*-selinux pkgs as obsolete
>
> These are replaced by `container-selinux` on fedora-25 and centos-7.
> Marking these packages as obsolete makes the installation process a bit
> smoother, otherwise the user will have to manually uninstall the older
> packages to install the new one.
>
> Also makes fedora24 use container-selinux which is now supports labeling
> the `dockerd` binary correctly.

Both CentOS 6/7 and Fedora 25 are EOL now, and these packages have not been
published for a long time. Time to remove them, also to reduce some noise
during builds;

    RPM build warnings:
        line 51: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-ce-selinux
        line 52: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-engine-selinux
        line 53: It's not recommended to have unversioned Obsoletes: Obsoletes: docker-engine

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-23 22:21:13 +01:00
Paweł Gronowski 5987b68311
Merge pull request #1151 from tonistiigi/update-buildx-v0.20.1
[master] update buildx to v0.20.1
2025-01-23 10:57:31 +01:00
Tonis Tiigi ac25375122
update buildx to v0.20.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-01-22 15:09:49 -08:00
Paweł Gronowski 5029f6d721
Merge pull request #1146 from thaJeztah/bump_golang_1.23.5
[master] update to go1.23.5 (fix CVE-2024-45341, CVE-2024-45336)
2025-01-21 15:05:12 +01:00
Sebastiaan van Stijn b46595a6db
Merge pull request #1148 from crazy-max/buildx-0.20.0
[master] update buildx to v0.20.0
2025-01-20 22:09:28 +01:00
CrazyMax 32893402a3
update buildx to v0.20.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-20 20:32:53 +01:00
Sebastiaan van Stijn 77181fd596
update to go1.23.5 (fix CVE-2024-45341, CVE-2024-45336)
go1.23.5 (released 2025-01-16) includes security fixes to the crypto/x509 and
net/http packages, as well as bug fixes to the compiler, the runtime, and the
net package. See the Go 1.23.5 milestone on our issue tracker for details;

- https://github.com/golang/go/issues?q=milestone%3AGo1.23.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.4...go1.23.5

Hello gophers,

We have just released Go versions 1.23.5 and 1.22.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- crypto/x509: usage of IPv6 zone IDs can bypass URI name constraints

  A certificate with a URI which has a IPv6 address with a zone ID may
  incorrectly satisfy a URI name constraint that applies to the certificate
  chain.

  Certificates containing URIs are not permitted in the web PKI, so this
  only affects users of private PKIs which make use of URIs.

  Thanks to Juho Forsén of Mattermost for reporting this issue.

  This is CVE-2024-45341 and Go issue https://go.dev/issue/71156.

- net/http: sensitive headers incorrectly sent after cross-domain redirect

  The HTTP client drops sensitive headers after following a cross-domain redirect.
  For example, a request to a.com/ containing an Authorization header which is
  redirected to b.com/ will not send that header to b.com.

  In the event that the client received a subsequent same-domain redirect, however,
  the sensitive headers would be restored. For example, a chain of redirects from
  a.com/, to b.com/1, and finally to b.com/2 would incorrectly send the Authorization
  header to b.com/2.

  Thanks to Kyle Seely for reporting this issue.

  This is CVE-2024-45336 and Go issue https://go.dev/issue/70530.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-20 16:11:40 +01:00
Paweł Gronowski 12adf2337f
Merge pull request #1143 from glours/bump-compose-v2.32.4
[master] bump compose verstion to v2.32.4
2025-01-16 10:34:11 +01:00
Guillaume Lours 74cd8cf0c1
bump compose verstion to v2.32.4
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-16 09:50:30 +01:00
Paweł Gronowski 039ad7f033
Merge pull request #1141 from glours/bump-compose-v2.32.3
[master] bump compose verstion to v2.32.3
2025-01-13 15:59:23 +01:00
Guillaume Lours 93a866aedb
bump compose verstion to v2.32.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-13 15:39:29 +01:00
Paweł Gronowski a512c309cc
Merge pull request #1139 from glours/bump-compose-v2.32.2
[master] bump compose verstion to v2.32.2
2025-01-07 16:31:46 +01:00
Guillaume Lours 1d13f0e4b9
bump compose verstion to v2.32.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-01-07 15:31:52 +01:00
Sebastiaan van Stijn f950f47310
Merge pull request #1135 from thaJeztah/update_spdx_identifier
[master] rpm: use SPDX identifier for License fields
2025-01-07 11:08:54 +01:00
Paweł Gronowski 3719514261
Merge pull request #1136 from thaJeztah/debian_stable
[master] Jenkinsfile: update Debian EOL dates
2025-01-07 09:12:40 +01:00
Sebastiaan van Stijn a522405b75
Jenkinsfile: update Debian EOL dates
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-01-02 00:22:24 +01:00
Sebastiaan van Stijn e72df489f1
rpm: use SPDX identifier for License fields
Update the license fields to use the (now recommented) SPDX identifier;

> https://docs.fedoraproject.org/en-US/legal/allowed-licenses/ lists
> Apache-2.0 as the SPDX identifier and ASL 2.0 as a "Legacy Abbreviation"
> for Apache License 2.0.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-26 15:43:41 +01:00
Sebastiaan van Stijn e47d6372bc
Merge pull request #1010 from neersighted/builddep_test
rpm: drop unnecessary build-deps
2024-12-26 14:12:42 +01:00
Bjorn Neergaard ddf1042427
rpm: drop unnecessary "which" build-dep
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-12-26 13:34:29 +01:00
Sebastiaan van Stijn 579aab665e
remove libarchive build-dep (was: fix missing archive_write_add_filter_zstd)
This reverts commit 78242140d7.

That change was  added to fix a missing archive_write_add_filter_zstd  when
compiling tini, but it's no longer needed;

> Add libarchive build-dep to fix missing archive_write_add_filter_zstd
>
> Trying to fix
>
>     + echo 'Install tini version de40ad007797e0dcd8b7126f27bb87401d224240'
>     + git clone https://github.com/krallin/tini.git /go/tini
>     Install tini version de40ad007797e0dcd8b7126f27bb87401d224240
>     Cloning into '/go/tini'...
>     + cd /go/tini
>     + git checkout -q de40ad007797e0dcd8b7126f27bb87401d224240
>     + cmake .
>     cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd
>     error: Bad exit status from /var/tmp/rpm-tmp.Dl5CDf (%build)
>
> According to https://bugs.centos.org/view.php?id=18212, upgrading to libarchive-3.3.3-1.el8.x86_64
> should resolve the problem.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-26 13:30:38 +01:00
Sebastiaan van Stijn 2f0c865a12
Merge pull request #1131 from crazy-max/update-buildx
update buildx to v0.19.3
2024-12-17 16:09:27 +01:00
CrazyMax 0275e8974e
update buildx to v0.19.3
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-12-17 13:34:14 +01:00
Sebastiaan van Stijn 74f28621e3
Merge pull request #1129 from ndeloof/compose-v2.32.1
Bump compose to v2.32.1
2024-12-16 18:58:46 +01:00
Nicolas De Loof 14af66f1cf
Bump compose to v2.32.1
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-16 16:23:14 +01:00
Sebastiaan van Stijn 6ce299537c
Merge pull request #1125 from ndeloof/bump_compose_v2.32.0
Bump Compose v2.32.0
2024-12-13 17:35:15 +01:00
Sebastiaan van Stijn 44476ef4f1
Merge pull request #1127 from vvoland/verify-remove-software-properties-common
verify: Remove `software-properties-common` package install
2024-12-13 17:14:07 +01:00
Paweł Gronowski 3e7dc9e5ac
verify: Remove `software-properties-common` package install
It's no longer needed

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-12-13 16:50:54 +01:00
Nicolas De Loof f52613ab54
Bump Compose v2.32.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-12-13 15:43:59 +01:00
Sebastiaan van Stijn 9abf4a979f
Merge pull request #1124 from thaJeztah/prune_dependencies
deb, rpm: remove libseccomp-dev, libseccomp2, libselinux-devel, selinux-policy-devel, aufs-tools dependenciies
2024-12-12 11:55:24 +01:00
Sebastiaan van Stijn ffad9399d5
deb: remove aufs-tools
The AuFS storage driver was deprecated and removed, so we can remove it
as a suggested dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 19:04:58 +01:00
Sebastiaan van Stijn 85327c1b86
rpm: remove version-constraint for container-selinux
The version constraint was added in e4b1c10a6b,
later updated in a246b19b07 to prevent old
versions to be used, as they had some issues.

Current version on RHEL8 (which is the oldest rpm distro we build for) is
2:2.229, so we can remove this explicit constraint.

    Installing:
     container-selinux                noarch           2:2.229.0-2.module+el8.10.0+22417+2fb00970          ubi-8-appstream-rpms           71 k

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 19:04:37 +01:00
Sebastiaan van Stijn c684248e59
rpm: remove selinux-policy-devel
This dependency was added in [docker@42d8fe6], at which time we were building
a docker-selinux policy with additional policies, but we're now depending
on the distro's `container-selinux` package and it was removed in the moby
repository in [docker@bfe5cab], so we can remove it here as well.

[docker@42d8fe6]: 42d8fe6105
[docker@bfe5cab]: bfe5cab13b

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 18:43:04 +01:00
Sebastiaan van Stijn fee28deafa
rpm: remove libselinux-devel dependency
The selinux code we use is purely a go implementation, and nothing links
libselinux.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 18:42:56 +01:00
Sebastiaan van Stijn fbdeaf5103
deb, rpm: remove libseccomp-dev, libseccomp2 dependencies
We used to have `libseccomp-dev` as a build-time dependency, but this
part is handled by the OCI runtime (runc). Similarly, the  `libseccomp2`
runtime dependency is used by `runc`, not by `dockerd` directly.

The docker-ce package depends on `containerd.io`, which defines `libseccomp2`
as a dependency, so we can remove it from the docker-ce package;

    apt-cache depends containerd.io
    containerd.io
      Depends: libc6
      Depends: libseccomp2
      Conflicts: containerd
      Conflicts: runc
      Replaces: containerd
        containerd.io
      Replaces: runc
        containerd.io

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-11 17:49:00 +01:00
Sebastiaan van Stijn c956517105
Merge pull request #1122 from tonistiigi/update-buildx-v0.19.2
update buildx to v0.19.2
2024-12-07 09:36:57 +01:00
Tonis Tiigi 6bf9111823
update buildx to v0.19.2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-12-06 15:41:30 -08:00
Sebastiaan van Stijn e9f9575b27
Merge pull request #1118 from thaJeztah/add_kmod
[master] deb,rpm: add kmod as recommended dependency to provide modprobe
2024-12-04 16:17:47 +01:00
Sebastiaan van Stijn 99b2d1454d
Merge pull request #1119 from thaJeztah/update_go_1.23.4
[master] update to go1.23.4
2024-12-04 13:15:56 +01:00
Sebastiaan van Stijn 960cccfdcd
update to go1.23.4
go1.23.4 (released 2024-12-03) includes fixes to the compiler, the runtime,
the trace command, and the syscall package. See the Go 1.23.4 milestone on
our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.23.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.3...go1.23.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-04 11:27:47 +01:00
Sebastiaan van Stijn deed8d9df8
deb,rpm: add kmod as recommended dependency to provide modprobe
Depending on the host configuration, the `br_netfilter` module may not
be loaded by default. In this situation, docker will try to load the module
through `modprobe`.

Older versions of docker would silently ignore failing to do so, log a message,
and continue;

    time="2024-11-29T20:04:58.538404376Z" level=warning msg="Running modprobe bridge br_netfilter failed with message: , error: exec: \"modprobe\": executable file not found in $PATH"

However, starting with [db25b0dcd0461802289e962aa0df3abd323d1994][1] and
[264c15bfc427d1321c5b302e48e16d113b06ef92][2], we now produce an error:

    === FAIL: libnetwork/drivers/bridge TestCreateFullOptions (0.04s)
    time="2024-11-29T19:03:44Z" level=error msg="Running modprobe br_netfilter failed with message: " error="exec: \"modprobe\": executable file not found in $PATH"
        bridge_linux_test.go:280: Failed to create bridge: loadBridgeNetFilterModule failed: cannot restrict inter-container communication: modprobe br_netfilter failed: exec: "modprobe": executable file not found in $PATH

This patch updates the packages to add `kmod` (which provides `modprobe`)
as a recommended dependency. We should probably look for alternatives in
our code to not require `modprobe`.

[1]: db25b0dcd0
[2]: 264c15bfc4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-29 21:48:11 +01:00
Paweł Gronowski 50cb52e8d5
Merge pull request #1116 from glours/bump-compose-v2.31.0
bump Compose to version v2.31.0
2024-11-28 11:19:11 +00:00
Guillaume Lours 5e03b03a34
bump Compose to version v2.31.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-11-28 11:54:39 +01:00
Sebastiaan van Stijn a40b8508e3
Merge pull request #1114 from tonistiigi/update-buildx-v0.19.1
update buildx to v0.19.1
2024-11-27 23:20:12 +01:00
Tonis Tiigi 59d9cc4cb0
update buildx to v0.19.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-27 10:39:08 -08:00
Sebastiaan van Stijn 6f038f03ca
Merge pull request #1113 from tonistiigi/update-buildx-v0.19.0
update buildx to v0.19.0
2024-11-27 10:26:58 +01:00
Tonis Tiigi 9a261dcbc5
update buildx to v0.19.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-11-26 17:59:37 -08:00
Sebastiaan van Stijn 22c4243647
Merge pull request #1110 from thaJeztah/remove_fedora_39
[master] remove Fedora 39 (EOL: November 12, 2024)
2024-11-14 15:25:04 +01:00
Sebastiaan van Stijn 9fb782bc80
remove Fedora 39 (EOL: November 12, 2024)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-14 14:34:32 +01:00
Sebastiaan van Stijn aea8c06a8f
Merge pull request #1108 from Romain-Geissler-1A/master
[master] Use the final CentOS Stream 10 OCI image.
2024-11-14 12:24:17 +01:00
Romain Geissler bcfe11895e
Use the final CentOS Stream 10 OCI image.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2024-11-14 10:10:29 +00:00
Sebastiaan van Stijn 7aff935175
Merge pull request #1104 from thaJeztah/carry_centos_10
[master] Add CentOS Stream 10.
2024-11-13 18:15:15 +01:00
Romain Geissler beae6320cd
Add CentOS Stream 10.
Use image "stream10-development" for now, after the release we should
remove the "-development" suffix.

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-13 17:54:52 +01:00
Sebastiaan van Stijn 61d4394397
Merge pull request #1105 from thaJeztah/remove_rpmlint
[master] rpm: remove rpmlint from Dockerfiles as it's not used
2024-11-13 17:53:27 +01:00
Sebastiaan van Stijn 38309c1b60
rpm: remove rpmlint from Dockerfiles as it's not used
Commit 784a53cec5 added `rpmlint` to the
Dockerfiles and added a step in the Dockerfile to validate the SPEC files.
The validation step was removed in c245ce12c1,
but didn't remove the step to install the package.

The `rpmlint` package is also being removed from CentOS Stream 10 ("CS10");

- https://issues.redhat.com/browse/CS-2451
- https://issues.redhat.com/browse/CS-2453

Remove the package as it's not used currently.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-13 15:59:15 +01:00
Sebastiaan van Stijn 6547a6f695
Merge pull request #1099 from thaJeztah/bump_golang_1.23.3
[master] update to go1.23.3
2024-11-08 09:10:36 +01:00
Sebastiaan van Stijn 037d96e52f
Merge pull request #1101 from thaJeztah/bump_compose_2.30.3
[master] bump Compose to version v2.30.3
2024-11-07 22:57:07 +01:00
Sebastiaan van Stijn 50f8a21069
bump Compose to version v2.30.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-07 21:58:06 +01:00
Sebastiaan van Stijn e79df7e59c
update to go1.23.3
- https://github.com/golang/go/issues?q=milestone%3AGo1.23.3+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.23.2...go1.23.3

go1.23.3 (released 2024-11-06) includes fixes to the linker, the
runtime, and the net/http, os, and syscall packages. See the Go 1.23.3
milestone on our issue tracker for details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-07 19:58:58 +01:00
Sebastiaan van Stijn 8f7655b144
Merge pull request #1097 from glours/bump-compose-v2.30.2
bump Compose to version v2.30.2
2024-11-05 18:36:41 +01:00
Guillaume Lours 205c707f58
bump Compose to version v2.30.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-11-05 18:11:30 +01:00
Sebastiaan van Stijn 9b10e860c6
Merge pull request #1093 from tonistiigi/update-buildx-v0.18.0
update buildx to v0.18.0
2024-10-31 17:43:17 +01:00
Paweł Gronowski 5045c057df
Merge pull request #1094 from thaJeztah/bump_golang_1.23.2
[master] update to go1.23.2
2024-10-31 13:10:43 +00:00
Sebastiaan van Stijn b6b388102a
update to go1.23.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-31 13:24:29 +01:00
Tonis Tiigi 32b967f8a6
update buildx to v0.18.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-10-30 15:47:51 -07:00
Paweł Gronowski 973166ad5f
Merge pull request #1091 from glours/bump-compose-v2.30.1
bump Compose to version v2.30.1
2024-10-30 11:13:35 +00:00
Guillaume Lours 0f7dd44db4
bump Compose to version v2.30.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-10-30 11:39:08 +01:00
Sebastiaan van Stijn 5303e5a59d
Merge pull request #1089 from glours/bump-compose-v2.30.0
bump Compose to version v2.30.0
2024-10-29 19:30:35 +01:00
Guillaume Lours 1d14711ab3
bump Compose to version v2.30.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-10-29 17:33:27 +01:00
Sebastiaan van Stijn d35a68df2c
Merge pull request #1087 from thaJeztah/bump_golang_1.22.8
[master] update to go1.22.8
2024-10-10 12:47:35 +02:00
Sebastiaan van Stijn d8b129e9f3
update to go1.22.8
go1.22.8 (released 2024-10-01) includes fixes to cgo, and the maps and syscall
packages. See the Go 1.22.8 milestone on our issue tracker for details;

- https://github.com/golang/go/issues?q=milestone%3AGo1.22.8+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.22.7...go1.22.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-10-08 09:42:35 +02:00
Laura Brehm c06433496a
Merge pull request #1085 from ndeloof/bump-compose-v2.29.7
Bup compose to v2.29.7
2024-09-20 10:59:16 +01:00
Nicolas De Loof 67c91eff69
Bup compose to v2.29.7
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-20 11:11:27 +02:00
Laura Brehm 6670de0afa
Merge pull request #1083 from glours/bump-compose-v2.29.6
[master] bump compose to version v2.29.6
2024-09-19 15:16:00 +01:00
Guillaume Lours f1da632d34
bump compose to version v2.29.6
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-09-19 15:25:02 +02:00
Sebastiaan van Stijn 99157ce70c
Merge pull request #1081 from thaJeztah/bump_compose
[master] bump compose to v2.29.5
2024-09-17 14:19:19 +02:00
Sebastiaan van Stijn 3497b37165
bump compose to v2.29.5
release-notes: https://github.com/docker/compose/releases/tag/v2.29.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-17 13:21:41 +02:00
Sebastiaan van Stijn c874261736
Merge pull request #1078 from glours/bump-compose-v2.29.4
[master] bump compose to version v2.29.4
2024-09-16 21:16:55 +02:00
Guillaume Lours 17c8893f94
bump compose to version v2.29.4
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-09-16 12:16:16 +02:00
Sebastiaan van Stijn 6b56c94990
Merge pull request #1077 from crazy-max/update-buildx
[master] update buildx to v0.17.1
2024-09-13 18:27:24 +02:00
CrazyMax 523d5dbdcb
update buildx to v0.17.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-13 17:53:56 +02:00
Sebastiaan van Stijn 57eea5d683
Merge pull request #1075 from glours/bump-compose-2.29.3
bump compose to v2.29.3
2024-09-12 18:59:50 +02:00
Guillaume Lours 857cd70fb2
bump compose to version v2.29.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-09-12 17:36:48 +02:00
Sebastiaan van Stijn 90a3371e8d
Merge pull request #1070 from thaJeztah/add_ubuntu_Oracular_Oriole_24.10
[master] Add Ubuntu 24.10 "Oracular Oriole"
2024-09-11 16:19:54 +02:00
Sebastiaan van Stijn a7c8523ab2
Add Ubuntu 24.10 "Oracular Oriole"
Ubuntu 24.10 is planned to be released on October 10.
https://discourse.ubuntu.com/t/oracular-oriole-release-schedule/36460

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 15:38:46 +02:00
Sebastiaan van Stijn e445e65152
Merge pull request #1071 from crazy-max/update-buildx
update buildx to v0.17.0
2024-09-10 19:40:16 +02:00
CrazyMax 9467f0c67b
update buildx to v0.17.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-09-10 19:18:01 +02:00
Paweł Gronowski 95fab049fa
Merge pull request #1067 from vvoland/update-go
[master] update to go1.22.7
2024-09-06 08:57:36 +00:00
Paweł Gronowski d6a07d0c29
update to go1.22.7
- https://github.com/golang/go/issues?q=milestone%3AGo1.22.7+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.22.6...go1.22.7

These minor releases include 3 security fixes following the security policy:

- go/parser: stack exhaustion in all Parse* functions

    Calling any of the Parse functions on Go source code which contains deeply nested literals can cause a panic due to stack exhaustion.

    This is CVE-2024-34155 and Go issue https://go.dev/issue/69138.

- encoding/gob: stack exhaustion in Decoder.Decode

    Calling Decoder.Decode on a message which contains deeply nested structures can cause a panic due to stack exhaustion.

    This is a follow-up to CVE-2022-30635.

    Thanks to Md Sakib Anwar of The Ohio State University (anwar.40@osu.edu) for reporting this issue.

    This is CVE-2024-34156 and Go issue https://go.dev/issue/69139.

- go/build/constraint: stack exhaustion in Parse

    Calling Parse on a "// +build" build tag line with deeply nested expressions can cause a panic due to stack exhaustion.

    This is CVE-2024-34158 and Go issue https://go.dev/issue/69141.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.7

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-09-05 17:54:35 +02:00
Sebastiaan van Stijn 5e90bd3efd
Merge pull request #1058 from thaJeztah/carry_1055_enable_f41_builds
[master] feat: build Fedora 41 RPM packages (carry #1055)
2024-09-04 16:50:35 +02:00
Sebastiaan van Stijn 563068bcf7
rpm: install binutils-gold as a precaution for arm64 builds
This is the equivalent of https://github.com/docker/containerd-packaging/pull/390
for containerd packages, but unlike for containerd packages, we currently do
not run into this issue when building docker-ce packages. We're installing
this as a precaution, but perhaps it's not needed.

go1.21 and up have a patch that enforces the use of ld.gold to work around
a bug in GNU binutils. See;

- https://github.com/golang/go/issues/22040.
- cd77738198

Fedora 41 and up has a fixed version of binutils, and no longer requires that
patch, but may fail without ld.gold installed;

    /usr/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-1738353519/go.o /tmp/go-link-1738353519/000000.o /tmp/go-link-1738353519/000001.o /tmp/go-link-1738353519/000002.o /tmp/go-link-1738353519/000003.o /tmp/go-link-1738353519/000004.o /tmp/go-link-1738353519/000005.o /tmp/go-link-1738353519/000006.o /tmp/go-link-1738353519/000007.o /tmp/go-link-1738353519/000008.o /tmp/go-link-1738353519/000009.o /tmp/go-link-1738353519/000010.o /tmp/go-link-1738353519/000011.o /tmp/go-link-1738353519/000012.o /tmp/go-link-1738353519/000013.o /tmp/go-link-1738353519/000014.o /tmp/go-link-1738353519/000015.o /tmp/go-link-1738353519/000016.o /tmp/go-link-1738353519/000017.o /tmp/go-link-1738353519/000018.o /tmp/go-link-1738353519/000019.o /tmp/go-link-1738353519/000020.o /tmp/go-link-1738353519/000021.o /tmp/go-link-1738353519/000022.o /tmp/go-link-1738353519/000023.o /tmp/go-link-1738353519/000024.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g
    collect2: fatal error: cannot find 'ld'

Fedora's build of Go carries a patch for that, but it's not (yet) in upstream;
- a867bd88a6/f/0006-Default-to-ld.bfd-on-ARM64.patch
- a867bd88a6?branch=rawhide

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 14:55:14 +02:00
Robert Sturla 36c9cf2dac
feat: build Fedora 41 RPM packages
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 14:55:12 +02:00
Paweł Gronowski 31371930b5
Merge pull request #1064 from thaJeztah/fix_dockerfile_linting
[master] rpm, deb: fix Dockerfile linting issues
2024-09-04 12:51:44 +00:00
Sebastiaan van Stijn 9c73210773
deb,rpm: fix Dockerfile default value for ARG linting warnings
The `GO_IMAGE` build-arg doesn't have a default;

     - InvalidDefaultArgInFrom: Default value for ARG ${GO_IMAGE} results in empty or invalid base image name (line 8)

This is not a real issue when building using the Makefiles (which is how
these Dockerfiles are expected to be used) but we can probably set a
default.

This patch sets the default to `golang:latest` to pick the latest version,
which should be fine for this (until we get a linter recommending not
to use `:latest`).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 13:34:57 +02:00
Sebastiaan van Stijn 3a7bbe78ca
rpm: fix Dockerfile legacy ENV key value format linting warnings
commit d61915e6c4 addressed these warnings
for the deb-based Dockerfiles, but didn't update the rpm ones;

     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 13)
     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 15)
     - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 16)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 13:34:54 +02:00
Paweł Gronowski 462b265a55
Merge pull request #1062 from thaJeztah/fix_gotoolchain_env
[master] rpm: fix missing GOTOOLCHAIN=local in centos, rhel Dockerfiles
2024-09-04 11:34:06 +00:00
Sebastiaan van Stijn dc175c09fd
rpm: fix missing GOTOOLCHAIN=local in centos, rhel Dockerfiles
Commit a4090a0e19 added GOTOOLCHAIN=local,
but for some reason missed the centos Dockerfiles.

The env-var is set to make sure we don't get unexpected updates of the go
toolchain when building. We need to set this env-var, because we're not using
the official golang image as base-image, but instead copy the binaries into
a distro-image.

This patch adds the missing GOTOOLCHAIN env-vars.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 12:39:14 +02:00
Sebastiaan van Stijn ec2c0b6382
Merge pull request #1059 from thaJeztah/rpm_dnf5_compat
[master] install_rpm_containerd: add support for dnf5
2024-09-04 11:57:47 +02:00
Sebastiaan van Stijn f43b3cf1dd
install_rpm_containerd: add workaround for dnf5 addrepo bug
The addrepo command has a bug that causes it to fail if the `.repo` file
contains empty lines, causing it to fail;

    dnf config-manager addrepo --from-repofile="https://download.docker.com/linux/fedora/docker-ce.repo"
    Error in added repository configuration file. Cannot set repository option "#1=
    ": Option "#1" not found

Use a temporary file and strip empty lines as a workaround until the bug
is fixed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 10:54:04 +02:00
Sebastiaan van Stijn 3fdf261960
install_rpm_containerd: add support for dnf5
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;

    + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
    Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
    make: *** [Makefile:95: verify] Error 2
    script returned exit code 2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 10:54:04 +02:00
Sebastiaan van Stijn c47674df7e
install_rpm_containerd: minor cleanup
- use command -v for detecting dnf instead of the --version
- quote repo-IDs to prevent globbing by the shell

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 10:54:04 +02:00
Sebastiaan van Stijn d757a760b1
Merge pull request #1056 from thaJeztah/update_go_1.22
[master] update to go1.22.6
2024-09-03 13:06:59 +02:00
Sebastiaan van Stijn c0536101e2
update to go1.22.6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-03 12:40:25 +02:00
Paweł Gronowski 80b9c8f5c8
Merge pull request #1047 from vvoland/fix-builder-lint
Dockerfile: Fix legacy `ENV key value` format
2024-08-26 17:52:19 +02:00
Sebastiaan van Stijn 65032d1c7d
Merge pull request #991 from neersighted/rhel-poc
RHEL PoC
2024-08-19 18:45:23 +02:00
Sebastiaan van Stijn 4c055aec27
rpm: use build-secret to pass subscription user/pass
Taking a similar approach as is used for containerd-packaging.
Note that the resulting subscription file will still be persisted
in the image, but this image is only used as an ephemeral image,
and on our builder-nodes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-19 15:53:11 +02:00
Bjorn Neergaard 6013e44b7e rpm: minimal RHEL support
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-16 18:53:33 +02:00
Bjorn Neergaard 56155f5aac rpm,deb: make build ARCH-aware
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-16 18:53:33 +02:00
Paweł Gronowski d61915e6c4
Dockerfile: Fix legacy `ENV key value` format
Replace legacy `ENV key value` syntax with `ENV key=value`.
This fixes the build linter warning LegacyKeyValueFormat.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-16 16:51:12 +02:00
Paweł Gronowski 0693b8611e
Merge pull request #1050 from thaJeztah/carry_compose-2.29.2
[master] Bump compose version to v2.29.2
2024-08-16 15:55:57 +02:00
Joana Hrotko e712fc4e40
Bump compose version to v2.29.2
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-08-16 14:35:28 +02:00
Sebastiaan van Stijn 692a7f5717
Merge pull request #1037 from robmry/remove_rootlesskit-docker-proxy
Remove 'rootlesskit-docker-proxy'
2024-08-16 14:33:35 +02:00
Sebastiaan van Stijn 9a1c3c18c2
Merge pull request #1044 from thaJeztah/verify_containerd_1.7
[master] verify: remove workaround for containerd-shim 1.6's missing "-v" flag
2024-08-08 12:38:28 +02:00
Sebastiaan van Stijn f681856914
Merge pull request #1046 from vvoland/update-go-1.21.13
[master] update to go1.21.13
2024-08-07 19:10:46 +02:00
Paweł Gronowski 3f0a3d1534
update to go1.21.13
- https://github.com/golang/go/issues?q=milestone%3AGo1.21.13+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.12...go1.21.13

go1.21.13 (released 2024-08-06) includes fixes to the go command, the
covdata command, and the bytes package. See the [Go 1.21.13 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.21.13+label%3ACherryPickApproved)
on our issue tracker for details.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-08-07 11:51:54 +02:00
Sebastiaan van Stijn 05b19e9937
Merge pull request #1045 from thaJeztah/windows_no_proxy
[master] static: remove unused docker-proxy.exe binary from Windows packages
2024-08-06 11:38:44 +02:00
Sebastiaan van Stijn 1e1bf07c10
static: remove unused docker-proxy.exe binary from Windows packages
The `docker-proxy.exe` binary was added to the static Windows packages through
commit 09541b553c (which introduced a bug, later
fixed through fc5379fee8).

It looks like that commit added the `docker-proxy.exe` binary with the
assumption that it's used on Windows (given that its also built in upstream),
but recent discussions revealed that's not the case.

This patch removes binary from the static packages for Windows, because it's
not used.

A quick look at Docker Desktop's build scripts show that it's not included
in those packages, and installation instructions for static binaries on
Windows do not mention this binary, so no further changes should be needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-06 11:16:25 +02:00
Sebastiaan van Stijn 60b2c18b37
verify: remove workaround for containerd-shim 1.6's missing "-v" flag
The containerd-shim binary that's shipped with containerd 1.6 did not provide
a `-v` flag to show the version, so f1f6f220e6
used `--help` as alternative.

Now that we package containerd 1.7, we can use the `-v` flag instead;

    containerd-shim -v
    containerd-shim
      Version:  1.7.19
      Revision: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41
      Go version: go1.21.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-08-06 10:32:00 +02:00
Sebastiaan van Stijn 2e60f4a93d
Merge pull request #1043 from crazy-max/update-buildx
[master] update buildx to v0.16.2
2024-07-25 18:50:24 +02:00
CrazyMax 2ec09e6cd3
update buildx to v0.16.2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-07-25 17:21:23 +02:00
Sebastiaan van Stijn 2ec4862755
Merge pull request #1042 from thaJeztah/remove_ubuntu_23.10
[master] remove Ubuntu 23.10 (Mantic Minotaur) (EOL: July 11, 2024)
2024-07-24 17:11:58 +02:00
Sebastiaan van Stijn 717529a68c
remove Ubuntu 23.10 (Mantic Minotaur) (EOL: July 11, 2024)
Ubuntu 23.10 reached EOL on July 11, 2024: https://fridge.ubuntu.com/2024/07/17/ubuntu-23-10-mantic-minotaur-reached-end-of-life-on-july-11-2024/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-24 14:53:45 +02:00
Sebastiaan van Stijn 8f6aa30513
Merge pull request #1040 from thaJeztah/remove_rhel7_rhel8_remnants
[master] rpm: remove CentOS/RHEL 7 leftovers
2024-07-24 13:20:48 +02:00
Sebastiaan van Stijn 6642fe5c4d
Merge pull request #1041 from ndeloof/bump-compose-v2.29.1
Bump compose v2.29.1
2024-07-23 19:32:05 +02:00
Nicolas De Loof 059614dfcc
Bump compose v2.29.1
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-23 16:43:33 +02:00
Sebastiaan van Stijn 57e225272c
rpm: remove RLIMIT_NOFILE patch for EL 7 systems
Now that CentOS/RHEL 7 and 8 reached EOL and removed from our packaging
(in 88a6cdca6c, 67c89e9aa0),
we can remove the patch.

> RLIMIT_NOFILE defaults to an unusable value on EL 7 systems, but more
> modern systems have sane defaults. As such, patch the systemd unit only
> on EL 7 systems to ensure correct behaviour.

This reverts commit 4e7a147bbc.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-20 19:17:53 +02:00
Sebastiaan van Stijn 98568994e1
rpm: remove conditional weak-dependencies for CentOS/RHEL 7
These conditionals were added in incfee3a64519ec5361b406eb6439aed7e3768b7c2
and bb4bd31ab6, because weak dependencies were
introduced in CentOS/RHEL 8 and higher (see [1], [2]), but not yet available
in CentOS/RHEL 7.

Now that CentOS/RHEL 7 reached EOL and removed from our packaging
(in 88a6cdca6c, 67c89e9aa0),
all supported RPM distros now support weak dependencies, so we can remove
the conditionals.

[1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#support-for-weak-dependencies_new-features-in-rhel-8
[2]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#boolean-dependencies-syntax

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-20 19:17:18 +02:00
Sebastiaan van Stijn 0b82433524
Merge pull request #1039 from tonistiigi/update-buildx-v0.16.1
update buildx to v0.16.1
2024-07-19 02:30:11 +02:00
Tonis Tiigi d84b549f10
update buildx to v0.16.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-07-18 14:49:19 -07:00
Paweł Gronowski b1fcb6d631
Merge pull request #1038 from glours/bump-compose-v2.29.0
bump Compose to version v2.29.0
2024-07-17 18:47:17 +02:00
Guillaume Lours 18d1831f15
bump Compose to version v2.29.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-07-17 16:34:49 +02:00
Rob Murray c8ca13e39c Remove 'rootlesskit-docker-proxy'
Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-07-15 19:36:59 +01:00
Sebastiaan van Stijn 2af20a9161
Merge pull request #1034 from vvoland/update-go
update to go1.21.12
2024-07-03 13:13:52 +02:00
Paweł Gronowski b896ff8fbf
update to go1.21.12
- https://github.com/golang/go/issues?q=milestone%3AGo1.21.12+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.11...go1.21.12

These minor releases include 1 security fixes following the security policy:

net/http: denial of service due to improper 100-continue handling

The net/http HTTP/1.1 client mishandled the case where a server responds to a request with an "Expect: 100-continue" header with a non-informational (200 or higher) status. This mishandling could leave a client connection in an invalid state, where the next request sent on the connection will fail.

An attacker sending a request to a net/http/httputil.ReverseProxy proxy can exploit this mishandling to cause a denial of service by sending "Expect: 100-continue" requests which elicit a non-informational response from the backend. Each such request leaves the proxy with an invalid connection, and causes one subsequent request using that connection to fail.

Thanks to Geoff Franks for reporting this issue.

This is CVE-2024-24791 and Go issue https://go.dev/issue/67555.
View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.12

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-07-03 10:40:52 +02:00
Paweł Gronowski 47a987492a
Merge pull request #1032 from glours/bump-compose-v2.28.1
bump Compose to version v2.28.1
2024-06-24 15:48:08 +02:00
Guillaume Lours e4d34eff2e
bump Compose to version v2.28.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-06-24 15:23:04 +02:00
Paweł Gronowski 107949a562
Merge pull request #1031 from glours/bump-compose-v2.28.0
bump Compose to version v2.28.0
2024-06-21 14:42:24 +02:00
Guillaume Lours 83b6c39386
bump Compose to version v2.28.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-06-21 14:23:35 +02:00
Sebastiaan van Stijn ce95feaf7a
Merge pull request #1030 from glours/bump-compose-v2.27.2
bump Compose to version v2.27.2
2024-06-20 13:02:05 +02:00
Guillaume Lours 4aba904be9
bump Compose to version v2.27.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-06-20 11:51:28 +02:00
Sebastiaan van Stijn 00933cbc57
Merge pull request #1029 from tonistiigi/update-buildx-v0.15.1
update buildx to v0.15.1
2024-06-18 21:43:59 +02:00
Tonis Tiigi 82f7cc3eaa
update buildx to v0.15.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-06-18 11:54:28 -07:00
Sebastiaan van Stijn 234c43246f
Merge pull request #1027 from thaJeztah/remove_debian_buster
[master] remove Debian and Raspbian 10 Buster (EOL LTS: 2024-06-30)
2024-06-18 20:20:33 +02:00
Sebastiaan van Stijn b4a8fc35ac
Merge pull request #1028 from thaJeztah/remove_centos7
[master] remove CentOS 7 (EOL 2024-06-30)
2024-06-18 20:20:12 +02:00
Sebastiaan van Stijn 88a6cdca6c
remove CentOS 7 (EOL 2024-06-30)
CentOS 7 [reaches EOL on June 30][1], so we won't be building packages
for v27.0

[1]: https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/#centos-linux-7-end-of-life-june-30-2024

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-18 18:14:39 +02:00
Sebastiaan van Stijn d0b87a16a0
remove Debian and Raspbian 10 Buster (EOL LTS: 2024-06-30)
Remove this version of Debian, which reaches end of the line. End of standard
support already reached EOL on 2022-09-10, and stopped advertising this version
of Debian in our documentation, but builds were still running.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-18 18:09:59 +02:00
Sebastiaan van Stijn 7e55ef4ad7
Merge pull request #1026 from thaJeztah/remove_fedora_38
[master] remove Fedora 38 as it's EOL
2024-06-12 10:04:08 +02:00
Sebastiaan van Stijn 2248618d76
remove Fedora 38 as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-11 23:04:55 +02:00
Sebastiaan van Stijn 3b8c88b0d7
Merge pull request #1025 from tonistiigi/update-buildx-v0.15.0
update buildx to v0.15.0
2024-06-11 22:55:24 +02:00
Tonis Tiigi 25fa9d175c
update buildx to v0.15.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-06-11 11:35:01 -07:00
Sebastiaan van Stijn 46da75a18e
Merge pull request #1023 from thaJeztah/bump_go1.21.11
[master] update to go1.21.11
2024-06-05 02:35:09 +02:00
Sebastiaan van Stijn 935a2c3c12
update to go1.21.11
go1.21.11 (released 2024-06-04) includes security fixes to the archive/zip
and net/netip packages, as well as bug fixes to the compiler, the go command,
the runtime, and the os package. See the Go 1.21.11 milestone on our issue
tracker for details;

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.11+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.10...go1.21.11

From the security announcement;

We have just released Go versions 1.22.4 and 1.21.11, minor point releases.
These minor releases include 2 security fixes following the security policy:

- archive/zip: mishandling of corrupt central directory record

  The archive/zip package's handling of certain types of invalid zip files
  differed from the behavior of most zip implementations. This misalignment
  could be exploited to create an zip file with contents that vary depending
  on the implementation reading the file. The archive/zip package now rejects
  files containing these errors.

  Thanks to Yufan You for reporting this issue.

  This is CVE-2024-24789 and Go issue https://go.dev/issue/66869.

- net/netip: unexpected behavior from Is methods for IPv4-mapped IPv6 addresses

  The various Is methods (IsPrivate, IsLoopback, etc) did not work as expected
  for IPv4-mapped IPv6 addresses, returning false for addresses which would
  return true in their traditional IPv4 forms.

  Thanks to Enze Wang of Alioth and Jianjun Chen of Zhongguancun Lab
  for reporting this issue.

  This is CVE-2024-24790 and Go issue https://go.dev/issue/67680.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-05 01:52:34 +02:00
Bjorn Neergaard 9653c3e5af
Merge pull request #1024 from thaJeztah/remove_centos8
[master] remove CentOS Stream 8 (EOL: 2024-05-31)
2024-06-04 17:06:50 -06:00
Sebastiaan van Stijn 67c89e9aa0
remove CentOS Stream 8 (EOL: 2024-05-31)
CentOS 8 reached EOL and the package repository is no longer live,
so removing it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-06-05 00:04:32 +02:00
Sebastiaan van Stijn 3402fc9533
Merge pull request #1022 from glours/bump-compose-v2.27.1
bump compose to version v2.27.1
2024-05-24 16:00:43 +02:00
Guillaume Lours ece1fe1dfc
bump compose to version v2.27.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-05-24 15:16:41 +02:00
Sebastiaan van Stijn 8c317e3fd7
Merge pull request #1021 from tonistiigi/update-buildx-v0.14.1
update buildx to v0.14.1
2024-05-22 20:49:57 +02:00
Tonis Tiigi 1fc9621c45
update buildx to v0.14.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-05-22 10:35:30 -07:00
Sebastiaan van Stijn 2651d2590e
Merge pull request #1019 from thaJeztah/simplify_conflicts
[master] deb, rpm: remove outdated "conflicts"
2024-05-10 15:59:19 +02:00
Sebastiaan van Stijn 7eab4151f4
deb: remove "Conflicts: lxc-docker, lxc-docker-virtual-package"
These conflicts were added as part of the first implementation of the deb
packaging scripts in [docker@eee1efcfd6c46dbdc5da02ca12722e399a56bb12] (2015)
to replace the old packages. These packages where part of the old PPA at
get.docker.io (see [1], [2]), which is long gone;

    curl -I https://get.docker.io/ubuntu
    HTTP/1.1 301 Moved Permanently
    content-length: 0
    location: https://get.docker.com/ubuntu

    curl -fsSL https://get.docker.com/ubuntu
    echo "# WARNING! This script is deprecated. Please use the script"
    echo "# at https://get.docker.com/"
    exit 1

[docker@eee1efcfd6c46dbdc5da02ca12722e399a56bb12]: eee1efcfd6
[2]: https://www.ubuntuupdates.org/package/docker/docker/main/base/lxc-docker
[3]: https://www.ubuntuupdates.org/ppa/docker?dist=docker

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-10 09:38:26 +02:00
Sebastiaan van Stijn a2184789ed
deb, rpm: remove "Conflicts: docker-engine-cs"
This was added in [docker@a15b67b1affb2eac5365614e55703f43b6f73e9b] (2015),
at which time this package was already deprecated / replaced:

> Add old docker-engine-cs name to package conflicts

[docker@a15b67b1affb2eac5365614e55703f43b6f73e9b]: a15b67b1af

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-05-10 09:17:33 +02:00
Paweł Gronowski 8deb73e3c2
Merge pull request #1018 from vvoland/update-go
[master] update to go1.21.10
2024-05-08 13:43:28 +02:00
Paweł Gronowski 7a36f3538c
update to go1.21.10
- https://github.com/golang/go/issues?q=milestone%3AGo1.21.10+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.9...go1.21.10

These minor releases include 2 security fixes following the security policy:

- cmd/go: arbitrary code execution during build on darwin
On Darwin, building a Go module which contains CGO can trigger arbitrary code execution when using the Apple version of ld, due to usage of the -lto_library flag in a "#cgo LDFLAGS" directive.
Thanks to Juho Forsén of Mattermost for reporting this issue.
This is CVE-2024-24787 and Go issue https://go.dev/issue/67119.

- net: malformed DNS message can cause infinite loop
A malformed DNS message in response to a query can cause the Lookup functions to get stuck in an infinite loop.
Thanks to long-name-let-people-remember-you on GitHub for reporting this issue, and to Mateusz Poliwczak for bringing the issue to our attention.
This is CVE-2024-24788 and Go issue https://go.dev/issue/66754.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.22.3

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-05-08 12:54:46 +02:00
Sebastiaan van Stijn 7a5a5f51ca
Merge pull request #1017 from glours/bump-compose-v2.27.0
bump compose to version v2.27.0
2024-04-25 14:04:47 +02:00
Guillaume Lours 6f723ce1e3
bump compose to version v2.27.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-04-24 22:45:20 +02:00
Paweł Gronowski b926edcbbb
Merge pull request #1014 from crazy-max/bump-buildx
update buildx to v0.14.0
2024-04-18 18:15:59 +02:00
CrazyMax ec6a1ad4aa
update buildx to v0.14.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-04-18 17:13:19 +02:00
Sebastiaan van Stijn a80fc883eb
Merge pull request #1013 from thaJeztah/disable_seccomp_rpm
[master] rpm: disable seccomp to prevent tar EPERM (Fedora 40 ppc64le on Debian)
2024-04-12 09:56:48 +02:00
Sebastiaan van Stijn 01886f57cb
rpm: disable seccomp to prevent tar EPERM (Fedora 40 ppc64le on Debian)
commit 07b5d9031f disabled seccomp for the
deb-builds because `chmod` failed tar was failing with an EPERM (Ubuntu
24.04 armhf on 20.04 host).

It looks like the same problem happens when running Fedora 40 on a Debian
bookworm host on ppc64le.

That issue was confirmed to be related to `fchmodat2(2)`, which is a new
syscall that's not supported on the host, and therefore gets the seccomp's
default EPERM;

    fchmodat2(AT_FDCWD, "docker", 0775, AT_SYMLINK_NOFOLLOW) = -1 EPERM (Operation not permitted)
    tar: docker: Cannot change mode to rwxrwxr-x: Operation not permitted
    tar: Exiting with failure status due to previous errors

Ultimately we need to update the libseccomp profile to use ENOSYS (see
moby ticket 42871) to allow it to degrade gracefully;

    fchmodat2(AT_FDCWD, "docker", 0775, AT_SYMLINK_NOFOLLOW) = -1 ENOSYS (Function not implemented)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-12 09:20:42 +02:00
Paweł Gronowski f1905fdba4
Merge pull request #1011 from vvoland/update-go
[master] update to go1.21.9
2024-04-10 12:49:06 +02:00
Paweł Gronowski b8ac04fb52
update to go1.21.9
go1.21.9 (released 2024-04-03) includes a security fix to the net/http
package, as well as bug fixes to the linker, and the go/types and
net/http packages. See the [Go 1.21.9 milestone](https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved)
for more details.

These minor releases include 1 security fixes following the security policy:

- http2: close connections when receiving too many headers
Maintaining HPACK state requires that we parse and process all HEADERS
and CONTINUATION frames on a connection. When a request's headers exceed
MaxHeaderBytes, we don't allocate memory to store the excess headers but
we do parse them. This permits an attacker to cause an HTTP/2 endpoint
to read arbitrary amounts of header data, all associated with a request
which is going to be rejected. These headers can include Huffman-encoded
data which is significantly more expensive for the receiver to decode
than for an attacker to send.
Set a limit on the amount of excess header frames we will process before
closing a connection.
Thanks to Bartek Nowotarski (https://nowotarski.info/) for reporting this issue.
This is CVE-2023-45288 and Go issue https://go.dev/issue/65051.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.9

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.9+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.8...go1.21.9

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-04-09 17:16:49 +02:00
Sebastiaan van Stijn 5e70d33ced
Merge pull request #1009 from milas/compose-2.26.1
update Compose to v2.26.1
2024-04-08 18:23:18 +02:00
Milas Bowman 9a47699cee update Compose to v2.26.1
https://github.com/docker/compose/releases/tag/v2.26.1

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2024-03-29 11:34:46 -04:00
Bjorn Neergaard 1e9d8a686e
Merge pull request #1008 from ndeloof/bump-compose-v2.26.0
Bump compose v2.26.0
2024-03-25 07:12:05 -06:00
Nicolas De Loof 4a6e10a7dd
Bump compose v2.26.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-22 19:05:38 +01:00
Bjorn Neergaard e926dd2d62
Merge pull request #1006 from thaJeztah/carry_994_noble
[master] Add Ubuntu 24.04 "Noble Numbat" (carry 994)
2024-03-19 10:37:41 -06:00
Akihiro Suda d9898f6e6c
Add Ubuntu 24.04 "Noble Numbat"
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-19 15:31:15 +01:00
Bjorn Neergaard f54c4086b3
Merge pull request #1007 from thaJeztah/disable_seccomp
[master] disable seccomp to prevent tar EPERM (Ubuntu 24.04 armhf on 20.04 host)
2024-03-19 08:30:15 -06:00
Sebastiaan van Stijn 07b5d9031f
disable seccomp to prevent tar EPERM (Ubuntu 24.04 armhf on 20.04 host)
tar is failing to apply permissions, but only on `armhf` if seccomp is enabled

    docker run --rm -e PLATFORM -e EPOCH='5' -e DEB_VERSION=0.0.0~20240319100031.2356372 -e VERSION=0.0.0-20240319100031-2356372 -e CLI_GITCOMMIT=2356372 -e ENGINE_GITCOMMIT=23e1af4 -e BUILDX_VERSION=v0.13.1 -e BUILDX_DEB_VERSION=0.13.1 -e BUILDX_GITCOMMIT=7884339 -e COMPOSE_VERSION=v2.25.0 -e COMPOSE_DEB_VERSION=2.25.0 -v /home/ubuntu/workspace/docker-ce-packaging_PR-1006/deb/debbuild/ubuntu-noble:/build  debbuild-ubuntu-noble/aarch64
    + set -e
    + mkdir -p /root/build-deb/engine
    + tar -C /root/build-deb -xzf /sources/engine.tgz
    tar: engine/daemon/config: Cannot change mode to rwxrwxr-x: Operation not permitted
    tar: engine/daemon/stats: Cannot change mode to rwxrwxr-x: Operation not permitted
    tar: engine/daemon/images: Cannot change mode to rwxrwxr-x: Operation not permitted
    tar: engine/daemon/containerd: Cannot change mode to rwxrwxr-x: Operation not permitted
    ...
    tar: engine/integration-cli: Cannot change mode to rwxrwxr-x: Operation not permitted
    tar: Exiting with failure status due to previous errors
    make[1]: *** [Makefile:80: ubuntu-noble] Error 2
    make[1]: Leaving directory '/home/ubuntu/workspace/docker-ce-packaging_PR-1006/deb'
    make: *** [Makefile:83: ubuntu-noble] Error 2
    script returned exit code 2

seccomp is blocking the fchmodat2 syscall because the host doesn't support it;

   fchmodat2(AT_FDCWD, "docker", 0775, AT_SYMLINK_NOFOLLOW) = -1 ENOSYS (Function not implemented)

This is failing when the ubuntu 24.04 armhf container runs on a ubuntu 20.04
host;

    Client: Docker Engine - Community
     Version:           25.0.3
     API version:       1.44
     Go version:        go1.21.6
     Git commit:        4debf41
     Built:             Tue Feb  6 21:22:23 2024
     OS/Arch:           linux/arm
     Context:           default

    Server: Docker Engine - Community
     Engine:
      Version:          25.0.3
      API version:      1.44 (minimum version 1.24)
      Go version:       go1.21.6
      Git commit:       f417435
      Built:            Tue Feb  6 21:22:23 2024
      OS/Arch:          linux/arm
      Experimental:     true
     containerd:
      Version:          1.6.28
      GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
     runc:
      Version:          1.1.12
      GitCommit:        v1.1.12-0-g51d5e94
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0

    Client: Docker Engine - Community
     Version:    25.0.3
     Context:    default
     Debug Mode: false
     Plugins:
      buildx: Docker Buildx (Docker Inc.)
        Version:  v0.12.1
        Path:     /usr/libexec/docker/cli-plugins/docker-buildx
      compose: Docker Compose (Docker Inc.)
        Version:  v2.24.5
        Path:     /usr/libexec/docker/cli-plugins/docker-compose

    Server:
     Containers: 0
      Running: 0
      Paused: 0
      Stopped: 0
     Images: 5
     Server Version: 25.0.3
     Storage Driver: overlay2
      Backing Filesystem: extfs
      Supports d_type: true
      Using metacopy: false
      Native Overlay Diff: true
      userxattr: false
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     Cgroup Version: 1
     Plugins:
      Volume: local
      Network: bridge host ipvlan macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
     Swarm: inactive
     Runtimes: runc io.containerd.runc.v2
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
     runc version: v1.1.12-0-g51d5e94
     init version: de40ad0
     Security Options:
      apparmor
      seccomp
       Profile: builtin
     Kernel Version: 5.15.0-1053-aws
     Operating System: Ubuntu 20.04.6 LTS
     OSType: linux
     Architecture: armv8l
     CPUs: 2
     Total Memory: 7.559GiB
     Name: ip-10-100-72-215
     ID: e901fd37-4acc-4712-8a91-b41a94767d78
     Docker Root Dir: /var/lib/docker
     Debug Mode: false
     Username: dockerbuildbot
     Experimental: true
     Insecure Registries:
      127.0.0.0/8
     Live Restore Enabled: true

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-19 14:43:39 +01:00
Sebastiaan van Stijn 9922aa46ad
Merge pull request #1005 from thaJeztah/carry_992_enable_fedora_40_builds
[master] Enable Fedora 40 builds (carry 992)
2024-03-19 12:38:06 +01:00
Robert Sturla b0abfdcebc
Enable Fedora 40 builds
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2024-03-19 11:45:03 +01:00
Sebastiaan van Stijn 5fb0be0755
Merge pull request #1004 from thaJeztah/pr_template
add pull-request template
2024-03-18 12:08:25 +01:00
Sebastiaan van Stijn c671f5ebd0
add pull-request template
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-18 11:21:21 +01:00
Sebastiaan van Stijn 635fcfa076
Merge pull request #1002 from ndeloof/bump-compose-v2.25.0
Bump compose v2.25.0
2024-03-15 18:04:01 +01:00
Sebastiaan van Stijn a15b7585ce
Merge pull request #1003 from neersighted/armhf
debian: build armv6 binaries for armhf
2024-03-15 18:03:34 +01:00
Bjorn Neergaard df6192b1ac
debian: build armv6 binaries for armhf
Debian armhf is armv7 and hard-float, and Raspbian is a rebuild of
Debian with armv6 and hard-float. This is done to make use of the
BCM2835 FPU, as while the Debian armel (armv5 and soft-float) port
works, it does not make full use of the CPU's hardware.

By making this change, our 'armhf' binaries will work on both armv6 and
armv7 systems.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-03-15 10:36:56 -06:00
Nicolas De Loof 51d83acb3f
Bump compose v2.25.0
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-15 14:22:39 +01:00
Sebastiaan van Stijn 6298c93526
Merge pull request #1001 from neersighted/goarm
debian: add explicit GOARM for raspbian
2024-03-14 15:32:02 +01:00
Bjorn Neergaard e6f3a10276
debian: add explicit GOARM for raspbian
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2024-03-14 07:52:58 -06:00
Sebastiaan van Stijn 6a613ebde7
Merge pull request #1000 from tonistiigi/update-buildx-v0.13.1
[master] update buildx to v0.13.1
2024-03-12 23:48:17 +01:00
Tonis Tiigi 937b1224b4
update buildx to v0.13.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-03-12 12:35:08 -07:00
Sebastiaan van Stijn 2153396d27
Merge pull request #999 from thaJeztah/add_comments
[master] common.mk: document some variables to prevent merge-conflicts
2024-03-06 20:43:37 +01:00
Sebastiaan van Stijn f00a4a9924
common.mk: document some variables to prevent merge-conflicts
Both the DOCKER_COMPOSE_REF and DOCKER_BUILDX_REF versions are frequently
updated, which made it more likely to run into merge conflicts when
pull requests are merged to update either.

Add a comment in between to reduce the probability for such PRs to
conflict.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-03-06 19:16:17 +01:00
Sebastiaan van Stijn 283bd99ba9
Merge pull request #998 from milas/compose-2.24.7
[master] update to Compose v2.24.7
2024-03-06 12:37:53 +01:00
Sebastiaan van Stijn 0b9bcb3e5c
Merge pull request #995 from AkihiroSuda/nit
Jenkinsfile: fix Ubuntu 22.04 End of Standard Support
2024-03-06 12:18:33 +01:00
Milas Bowman 61a8f6c418
update to Compose v2.24.7
https://github.com/docker/compose/releases/tag/v2.24.7

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2024-03-06 12:16:40 +01:00
Sebastiaan van Stijn 18600fcbb9
Merge pull request #997 from tonistiigi/update-buildx-v0.13.0
update buildx to v0.13.0
2024-03-06 12:14:05 +01:00
Bjorn Neergaard 63afa59786
Merge pull request #996 from vvoland/go-1.21.8
update to go-1.21.8
2024-03-05 14:54:45 -07:00
Tonis Tiigi ad418a3739
update buildx to v0.13.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-03-05 13:32:07 -08:00
Paweł Gronowski 5488aab418
update to go-1.21.8
go1.21.8 (released 2024-03-05) includes 5 security fixes:

- crypto/x509: Verify panics on certificates with an unknown public key algorithm (CVE-2024-24783, https://go.dev/issue/65390)
- net/http: memory exhaustion in Request.ParseMultipartForm (CVE-2023-45290, https://go.dev/issue/65383)
- net/http, net/http/cookiejar: incorrect forwarding of sensitive headers and cookies on HTTP redirect (CVE-2023-45289, https://go.dev/issue/65065)
- html/template: errors returned from MarshalJSON methods may break template escaping (CVE-2024-24785, https://go.dev/issue/65697)
- net/mail: comments in display names are incorrectly handled (CVE-2024-24784, https://go.dev/issue/65083)

View the release notes for more information:
https://go.dev/doc/devel/release#go1.21.8

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.8+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.7...go1.21.8

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-05 22:29:08 +01:00
Akihiro Suda 106767b018
Jenkinsfile: fix Ubuntu 22.04 End of Standard Support
The End of Standard Support is set to June, not April, in 2027.
https://wiki.ubuntu.com/Releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-05 11:24:24 +09:00
Paweł Gronowski 996e5d03e9
Merge pull request #989 from thaJeztah/update_go_1.21.7
[master] update to go1.21.7
2024-02-28 13:15:45 +01:00
Sebastiaan van Stijn 813bb9e74e
update to go1.21.7
go1.21.7 (released 2024-02-06) includes fixes to the compiler, the go command,
the runtime, and the crypto/x509 package. See the Go 1.21.7 milestone on our
issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.7+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.6...go1.21.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-19 14:16:55 +01:00
Laura Brehm 963aa02666
Merge pull request #988 from glours/bump-compose-v2.24.6
bump compose to version v2.24.6
2024-02-16 12:08:51 +00:00
Guillaume Lours 248f67a9ee
bump compose to version v2.24.6
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-02-15 17:08:59 +01:00
Sebastiaan van Stijn 004963211e
Merge pull request #986 from thaJeztah/remove_ubuntu_23.04
remove Ubuntu Lunar 23.04, as it's EOL
2024-02-02 14:01:17 +01:00
Sebastiaan van Stijn a44d4c194c
remove Ubuntu Lunar 23.04, as it's EOL
Ubuntu 23.04 reached EOL on January 25, 2024, so should no longer be used.
https://wiki.ubuntu.com/Releases#End_of_Life

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-02-02 12:35:21 +01:00
Sebastiaan van Stijn 6a172cbdbf
Merge pull request #985 from milas/compose-2.24.5
update to Compose v2.24.5
2024-01-30 22:10:41 +01:00
Milas Bowman d0fe61246e update to Compose v2.24.5
https://github.com/docker/compose/releases/tag/v2.24.5

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2024-01-30 14:30:43 -05:00
Sebastiaan van Stijn 57c58f987d
Merge pull request #984 from glours/bump-compose-v2.24.4
bump compose to version v2.24.4
2024-01-30 02:03:16 +01:00
Guillaume Lours 8ce928b926
bump compose to version v2.24.4
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-01-29 23:20:20 +01:00
Sebastiaan van Stijn 05ecd29505
Merge pull request #983 from thaJeztah/update_compose
[master] bump compose to version v2.24.3
2024-01-26 08:18:10 +01:00
Sebastiaan van Stijn adbf2a5f8f
bump compose to version v2.24.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-25 23:27:32 +01:00
Sebastiaan van Stijn 170be9bd32
Merge pull request #981 from glours/bump-compose-v2.24.2
bump compose to version v2.24.2
2024-01-22 22:37:39 +01:00
Guillaume Lours 06f15151db
bump compose to version v2.24.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-01-22 17:45:31 +01:00
Sebastiaan van Stijn e907e7a335
Merge pull request #980 from glours/bump-compose-v2.24.1
bump compose to version v2.24.1
2024-01-18 12:59:38 +01:00
Guillaume Lours 64ac007427
bump compose to version v2.24.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-01-18 11:20:54 +01:00
Sebastiaan van Stijn bb65de67c3
Merge pull request #979 from crazy-max/update-buildx
[master] update buildx to v0.12.1
2024-01-12 12:10:38 +01:00
CrazyMax 367f108146
update buildx to v0.12.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-01-12 10:15:00 +01:00
Sebastiaan van Stijn 46b3f3c491
Merge pull request #978 from thaJeztah/bump_compose
bump compose version to v2.24.0
2024-01-11 18:46:35 +01:00
jhrotko be784316a9 bump compose version to v2.24.0
Signed-off-by: jhrotko <joana.hrotko@docker.com>
2024-01-11 13:32:00 +00:00
Sebastiaan van Stijn 1bd5d3ab05
Merge pull request #974 from thaJeztah/update_golang_1.21.6
update to go1.21.6
2024-01-10 17:58:57 +01:00
Sebastiaan van Stijn 3444992666
update to go1.21.6
go1.21.6 (released 2024-01-09) includes fixes to the compiler, the runtime, and
the crypto/tls, maps, and runtime/pprof packages. See the Go 1.21.6 milestone on
our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.6+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.5...go1.21.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-01-10 10:21:39 +01:00
Sebastiaan van Stijn 11d75630fd
Merge pull request #972 from thaJeztah/update_golang_1.21.5
[master] update to go1.21.5
2023-12-06 01:56:53 +01:00
Sebastiaan van Stijn 200ad53a0b
update to go1.21.5
go1.21.5 (released 2023-12-05) includes security fixes to the go command,
and the net/http and path/filepath packages, as well as bug fixes to the
compiler, the go command, the runtime, and the crypto/rand, net, os, and
syscall packages. See the Go 1.21.5 milestone on our issue tracker for
details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.5+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.5...go1.21.5

from the security mailing:

[security] Go 1.21.5 and Go 1.20.12 are released

Hello gophers,

We have just released Go versions 1.21.5 and 1.20.12, minor point releases.

These minor releases include 3 security fixes following the security policy:

- net/http: limit chunked data overhead

  A malicious HTTP sender can use chunk extensions to cause a receiver
  reading from a request or response body to read many more bytes from
  the network than are in the body.

  A malicious HTTP client can further exploit this to cause a server to
  automatically read a large amount of data (up to about 1GiB) when a
  handler fails to read the entire body of a request.

  Chunk extensions are a little-used HTTP feature which permit including
  additional metadata in a request or response body sent using the chunked
  encoding. The net/http chunked encoding reader discards this metadata.
  A sender can exploit this by inserting a large metadata segment with
  each byte transferred. The chunk reader now produces an error if the
  ratio of real body to encoded bytes grows too small.

  Thanks to Bartek Nowotarski for reporting this issue.

  This is CVE-2023-39326 and Go issue https://go.dev/issue/64433.

- cmd/go: go get may unexpectedly fallback to insecure git

  Using go get to fetch a module with the ".git" suffix may unexpectedly
  fallback to the insecure "git://" protocol if the module is unavailable
  via the secure "https://" and "git+ssh://" protocols, even if GOINSECURE
  is not set for said module. This only affects users who are not using
  the module proxy and are fetching modules directly (i.e. GOPROXY=off).

  Thanks to David Leadbeater for reporting this issue.

  This is CVE-2023-45285 and Go issue https://go.dev/issue/63845.

- path/filepath: retain trailing \ when cleaning paths like \\?\c:\

  Go 1.20.11 and Go 1.21.4 inadvertently changed the definition of the
  volume name in Windows paths starting with \\?\, resulting in
  filepath.Clean(\\?\c:\) returning \\?\c: rather than \\?\c:\ (among
  other effects). The previous behavior has been restored.

  This is an update to CVE-2023-45283 and Go issue https://go.dev/issue/64028.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-06 00:57:14 +01:00
Sebastiaan van Stijn d5a04c5766
update to go1.21.4
Revert "Revert "update to go1.21.4" due to regressions / breaking changes."

This reverts commit 65de054a1e.
This re-applies commit 8cb2b0efee

----

update to go1.21.4

go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker, the runtime, the compiler, and
the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone
on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.3...go1.21.4

from the security mailing:

[security] Go 1.21.4 and Go 1.20.11 are released

Hello gophers,

We have just released Go versions 1.21.4 and 1.20.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- path/filepath: recognize `\??\` as a Root Local Device path prefix.

  On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
  to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
  access arbitrary locations on the system. For example, the path `\??\c:\x`
  is equivalent to the more common path c:\x.

  The filepath package did not recognize paths with a `\??\` prefix as special.

  Clean could convert a rooted path such as `\a\..\??\b` into
  the root local device path `\??\b`. It will now convert this
  path into `.\??\b`.

  `IsAbs` did not report paths beginning with `\??\` as absolute.
  It now does so.

  VolumeName now reports the `\??\` prefix as a volume name.

  `Join(`\`, `??`, `b`)` could convert a seemingly innocent
  sequence of path elements into the root local device path
  `\??\b`. It will now convert this to `\.\??\b`.

  This is CVE-2023-45283 and https://go.dev/issue/63713.

- path/filepath: recognize device names with trailing spaces and superscripts

  The `IsLocal` function did not correctly detect reserved names in some cases:

  - reserved names followed by spaces, such as "COM1 ".
  - "COM" or "LPT" followed by a superscript 1, 2, or 3.

  `IsLocal` now correctly reports these names as non-local.

  This is CVE-2023-45284 and https://go.dev/issue/63713.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-12-06 00:55:09 +01:00
Sebastiaan van Stijn 9385809d8e
Merge pull request #971 from glours/bump-compose-2.23.3
bump compose version to v2.23.3
2023-11-23 13:34:24 +01:00
Guillaume Lours d14045c1d3
bump compose version to v2.23.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-11-23 10:46:57 +01:00
Sebastiaan van Stijn 5b464fc586
Merge pull request #969 from thaJeztah/remove_fedora_37
[master] remove Fedora 37 as it's EOL
2023-11-22 12:23:55 +01:00
Sebastiaan van Stijn efd72c86a8
remove Fedora 37 as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-22 09:43:07 +01:00
Sebastiaan van Stijn 9edcac206b
Merge pull request #968 from neersighted/rpm_rlimit_nofile
rpm: patch RLIMIT_NOFILE for EL 7 systems
2023-11-21 19:40:27 +01:00
Bjorn Neergaard 4e7a147bbc
rpm: patch RLIMIT_NOFILE for EL 7 systems
RLIMIT_NOFILE defaults to an unusable value on EL 7 systems, but more
modern systems have sane defaults. As such, patch the systemd unit only
on EL 7 systems to ensure correct behaviour.

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-11-21 10:55:26 -07:00
Sebastiaan van Stijn f7ffb570f4
Merge pull request #966 from tonistiigi/buildx-v0.12.0
update buildx to v0.12.0
2023-11-20 19:56:34 +01:00
Tonis Tiigi 7a0d31198c
update buildx to v0.12.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-11-16 15:43:04 -08:00
Nicolas De loof 406dc88320
Merge pull request #964 from ndeloof/compose-v2.23.1
bump compose to v2.23.1
2023-11-16 11:43:31 +01:00
Nicolas De Loof f4bdcd2c8a
bump compose to v2.23.1
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-11-16 08:53:23 +01:00
Sebastiaan van Stijn 3479bfbc96
Merge pull request #963 from thaJeztah/revert_update_golang_1.21.4
[master] Revert "update to go1.21.4" due to regressions / breaking changes.
2023-11-09 13:04:37 +01:00
Sebastiaan van Stijn 65de054a1e
Revert "update to go1.21.4" due to regressions / breaking changes.
Unfortunately, the go1.21.4 security update exposed some regressions / breaking
changes in moby (docker engine) and containerd. These issues are looked into,
but in the meantime we should revert this patch.

This temporarily reintroduces CVE-2023-45284 and CVE-2023-45283.

This reverts commit 8cb2b0efee.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-09 11:09:12 +01:00
Sebastiaan van Stijn b1821d03e0
Merge pull request #962 from thaJeztah/update_golang_1.21.4
[master] update to go1.21.4
2023-11-08 19:01:21 +01:00
Sebastiaan van Stijn 8cb2b0efee
update to go1.21.4
go1.21.4 (released 2023-11-07) includes security fixes to the path/filepath
package, as well as bug fixes to the linker, the runtime, the compiler, and
the go/types, net/http, and runtime/cgo packages. See the Go 1.21.4 milestone
on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.21.4+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.21.3...go1.21.4

from the security mailing:

[security] Go 1.21.4 and Go 1.20.11 are released

Hello gophers,

We have just released Go versions 1.21.4 and 1.20.11, minor point releases.

These minor releases include 2 security fixes following the security policy:

- path/filepath: recognize `\??\` as a Root Local Device path prefix.

  On Windows, a path beginning with `\??\` is a Root Local Device path equivalent
  to a path beginning with `\\?\`. Paths with a `\??\` prefix may be used to
  access arbitrary locations on the system. For example, the path `\??\c:\x`
  is equivalent to the more common path c:\x.

  The filepath package did not recognize paths with a `\??\` prefix as special.

  Clean could convert a rooted path such as `\a\..\??\b` into
  the root local device path `\??\b`. It will now convert this
  path into `.\??\b`.

  `IsAbs` did not report paths beginning with `\??\` as absolute.
  It now does so.

  VolumeName now reports the `\??\` prefix as a volume name.

  `Join(`\`, `??`, `b`)` could convert a seemingly innocent
  sequence of path elements into the root local device path
  `\??\b`. It will now convert this to `\.\??\b`.

  This is CVE-2023-45283 and https://go.dev/issue/63713.

- path/filepath: recognize device names with trailing spaces and superscripts

  The `IsLocal` function did not correctly detect reserved names in some cases:

  - reserved names followed by spaces, such as "COM1 ".
  - "COM" or "LPT" followed by a superscript 1, 2, or 3.

  `IsLocal` now correctly reports these names as non-local.

  This is CVE-2023-45284 and https://go.dev/issue/63713.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-08 18:41:46 +01:00
Sebastiaan van Stijn 4014e506c4
Merge pull request #961 from thaJeztah/bvump_containerd
deb, rpm: set minimum containerd version to 1.6.24
2023-11-06 23:21:55 +01:00
Sebastiaan van Stijn 4124d1dfab
deb, rpm: set minimum containerd version to 1.6.24
relates to https://github.com/moby/moby/pull/46778

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-06 21:15:53 +01:00
Sebastiaan van Stijn d76f75ac88
Merge pull request #959 from thaJeztah/remove_devicemapper_deps
[master] remove devicemapper dependencies
2023-10-19 18:39:16 +02:00
Sebastiaan van Stijn 828518ff97
remove devicemapper dependencies
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 16:58:40 +02:00
Sebastiaan van Stijn 11c92d53ef
Merge pull request #958 from glours/bump-compose-2.23.0
bump compose version to v2.23.0
2023-10-19 09:33:21 +02:00
Guillaume Lours 7048902e11
bump compose version to v2.23.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-10-18 19:02:04 +02:00
Sebastiaan van Stijn ae7f39cfed
Merge pull request #956 from thaJeztah/ubuntu_23.10_comment
[master] Jenkinsfile: fix version and eol-date for Ubuntu mantic (23.10)
2023-10-13 14:54:23 +02:00
Sebastiaan van Stijn a91777433e
Jenkinsfile: fix version and eol-date for Ubuntu mantic (23.10)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-13 14:10:18 +02:00
Sebastiaan van Stijn f7f950e5e8
Merge pull request #954 from thaJeztah/add_ubuntu_mantic_minotaur_23.10_carry
[Master] Add Ubuntu 23.10 "Mantic Minotaur" (test in CI)
2023-10-13 14:04:13 +02:00
Ross Smith II f21c386086
[Master] Add Ubuntu 23.10 "Mantic Minotaur"
Signed-off-by: Ross Smith II <ross@smithii.com>
2023-10-13 12:51:37 +02:00
Sebastiaan van Stijn f0e566d43a
Merge pull request #946 from glours/bump-compose-2.22.0
[master] bump compose version to v2.22.0
2023-10-12 12:33:04 +02:00
Guillaume Lours 3e54ed5d41 bump compose version to v2.22.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-10-12 12:00:46 +02:00
Sebastiaan van Stijn 2823dcc217
Merge pull request #950 from thaJeztah/update_golang_1.21.3
[master] update to go1.21.3
2023-10-11 20:44:26 +02:00
Sebastiaan van Stijn e913f757d2
update to go1.21.3
go1.21.3 (released 2023-10-10) includes a security fix to the net/http package.
See the Go 1.21.3 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.21.3+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.21.2...go1.21.3

From the security mailing:

[security] Go 1.21.3 and Go 1.20.10 are released

Hello gophers,

We have just released Go versions 1.21.3 and 1.20.10, minor point releases.

These minor releases include 1 security fixes following the security policy:

- net/http: rapid stream resets can cause excessive work

  A malicious HTTP/2 client which rapidly creates requests and
  immediately resets them can cause excessive server resource consumption.
  While the total number of requests is bounded to the
  http2.Server.MaxConcurrentStreams setting, resetting an in-progress
  request allows the attacker to create a new request while the existing
  one is still executing.

  HTTP/2 servers now bound the number of simultaneously executing
  handler goroutines to the stream concurrency limit. New requests
  arriving when at the limit (which can only happen after the client
  has reset an existing, in-flight request) will be queued until a
  handler exits. If the request queue grows too large, the server
  will terminate the connection.

  This issue is also fixed in golang.org/x/net/http2 v0.17.0,
  for users manually configuring HTTP/2.

  The default stream concurrency limit is 250 streams (requests)
  per HTTP/2 connection. This value may be adjusted using the
  golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams
  setting and the ConfigureServer function.

  This is CVE-2023-39325 and Go issue https://go.dev/issue/63417.
  This is also tracked by CVE-2023-44487.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-11 20:14:31 +02:00
Sebastiaan van Stijn be6af50ae1
Merge pull request #948 from glours/bump-golang-1.21
bump golang to version v1.21.2
2023-10-11 20:09:52 +02:00
Guillaume Lours bde2dcbb4d
bump golang to version v1.21.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-10-10 18:22:38 +02:00
Bjorn Neergaard ccba51a659
Merge pull request #852 from ruizink/fix-rpm-spec
Add docker.socket to the %preun section
2023-09-29 09:49:03 -06:00
Sebastiaan van Stijn d597d5d9f7
Merge pull request #947 from thaJeztah/gotoolchain_local
deb, rpm: use GOTOOLCHAIN=local
2023-09-27 10:06:39 +02:00
Sebastiaan van Stijn a4090a0e19
deb, rpm: use GOTOOLCHAIN=local
Make sure we don't get unexpected updates of the go toolchain when building.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 12:50:01 +02:00
Sebastiaan van Stijn 2419e4e43d
Merge pull request #945 from thaJeztah/recommends_not_requires
rpm: recommend, not require  "docker-ce-rootless-extras" where possible
2023-09-21 00:02:13 +02:00
Sebastiaan van Stijn cfee3a6451
rpm: recommend, not require "docker-ce-rootless-extras" where possible
The deb pacakges have this dependency as "recommends", but older versions
of yum (RHEL7 / CentOS 7) do not support this. and only support "requires".

This patch uses a similar approach as bb4bd31ab6
did for the CLI, and changes the dependency to be "recommends" where possible,
falling back to "requires" for older rpm versions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-20 21:38:25 +02:00
Bjorn Neergaard 6f661450b8
Merge pull request #944 from zhangyoufu/fix-942
fix default value for VERIFY_PACKAGE_REPO
2023-09-20 11:30:45 -06:00
Sebastiaan van Stijn aab073c0e0
Merge pull request #940 from p5/build-fedora-39-rpms
Build Fedora 39 RPM packages
2023-09-20 12:57:08 +02:00
Youfu Zhang 8224e5c5c4
fix default value for VERIFY_PACKAGE_REPO
fixes #942

Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2023-09-20 17:29:51 +08:00
Robert Sturla f0d57965ee Enable Docker CE builds for Fedora 39
Signed-off-by: Robert Sturla <robertsturla@outlook.com>
2023-09-20 08:38:18 +01:00
Bjorn Neergaard dfe2ab9d0a
Merge pull request #938 from thaJeztah/update_golang_1.20.8
[master] update to go1.20.8
2023-09-13 09:15:14 -06:00
Sebastiaan van Stijn defc2b8900
update to go1.20.8
go1.20.8 (released 2023-09-06) includes two security fixes to the html/template
package, as well as bug fixes to the compiler, the go command, the runtime,
and the crypto/tls, go/types, net/http, and path/filepath packages. See the
Go 1.20.8 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.20.8+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.20.7...go1.20.8

From the security mailing:

[security] Go 1.21.1 and Go 1.20.8 are released

Hello gophers,

We have just released Go versions 1.21.1 and 1.20.8, minor point releases.

These minor releases include 4 security fixes following the security policy:

- cmd/go: go.mod toolchain directive allows arbitrary execution
  The go.mod toolchain directive, introduced in Go 1.21, could be leveraged to
  execute scripts and binaries relative to the root of the module when the "go"
  command was executed within the module. This applies to modules downloaded using
  the "go" command from the module proxy, as well as modules downloaded directly
  using VCS software.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-39320 and Go issue https://go.dev/issue/62198.

- html/template: improper handling of HTML-like comments within script contexts
  The html/template package did not properly handle HMTL-like "<!--" and "-->"
  comment tokens, nor hashbang "#!" comment tokens, in <script> contexts. This may
  cause the template parser to improperly interpret the contents of <script>
  contexts, causing actions to be improperly escaped. This could be leveraged to
  perform an XSS attack.

  Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this
  issue.

  This is CVE-2023-39318 and Go issue https://go.dev/issue/62196.

- html/template: improper handling of special tags within script contexts
  The html/template package did not apply the proper rules for handling occurrences
  of "<script", "<!--", and "</script" within JS literals in <script> contexts.
  This may cause the template parser to improperly consider script contexts to be
  terminated early, causing actions to be improperly escaped. This could be
  leveraged to perform an XSS attack.

  Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this
  issue.

  This is CVE-2023-39319 and Go issue https://go.dev/issue/62197.

- crypto/tls: panic when processing post-handshake message on QUIC connections
  Processing an incomplete post-handshake message for a QUIC connection caused a panic.

  Thanks to Marten Seemann for reporting this issue.

  This is CVE-2023-39321 and CVE-2023-39322 and Go issue https://go.dev/issue/62266.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-11 15:51:28 +02:00
Sebastiaan van Stijn b4ce5ed9ef
Merge pull request #936 from milas/compose-2.21.0
bump compose version to v2.21.0
2023-09-01 22:29:13 +02:00
Milas Bowman b03db9debf bump compose version to v2.21.0
https://github.com/docker/compose/releases/tag/v2.21.0

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-08-31 08:57:42 -04:00
Sebastiaan van Stijn 7496c130ef
Merge pull request #928 from thaJeztah/remove_ubuntu_22.10
[master] remove ubuntu 22.10 (Kinetic Kudu) as it reached EOL
2023-08-21 14:25:31 +02:00
Bjorn Neergaard b80b652e81
Merge pull request #934 from glours/bump-compose-2.20.3
bump compose version to v2.20.3
2023-08-11 06:42:57 -06:00
Guillaume Lours 541dce608c
bump compose version to v2.20.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-08-11 11:57:02 +02:00
Sebastiaan van Stijn 6d29a61207
Merge pull request #931 from thaJeztah/update_go1.20.7
[master] update to go1.20.7
2023-08-02 11:52:16 +02:00
Sebastiaan van Stijn ddfdd52818
update to go1.20.7
Includes a fix for CVE-2023-29409

go1.20.7 (released 2023-08-01) includes a security fix to the crypto/tls
package, as well as bug fixes to the assembler and the compiler. See the
Go 1.20.7 milestone on our issue tracker for details:

- https://github.com/golang/go/issues?q=milestone%3AGo1.20.7+label%3ACherryPickApproved
- full diff: https://github.com/golang/go/compare/go1.20.6...go1.20.7

From the mailing list announcement:

[security] Go 1.20.7 and Go 1.19.12 are released

Hello gophers,

We have just released Go versions 1.20.7 and 1.19.12, minor point releases.

These minor releases include 1 security fixes following the security policy:

- crypto/tls: restrict RSA keys in certificates to <= 8192 bits

  Extremely large RSA keys in certificate chains can cause a client/server
  to expend significant CPU time verifying signatures. Limit this by
  restricting the size of RSA keys transmitted during handshakes to <=
  8192 bits.

  Based on a survey of publicly trusted RSA keys, there are currently only
  three certificates in circulation with keys larger than this, and all
  three appear to be test certificates that are not actively deployed. It
  is possible there are larger keys in use in private PKIs, but we target
  the web PKI, so causing breakage here in the interests of increasing the
  default safety of users of crypto/tls seems reasonable.

  Thanks to Mateusz Poliwczak for reporting this issue.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.20.7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-02 00:02:10 +02:00
Sebastiaan van Stijn 72742c3faa
remove ubuntu 22.10 (Kinetic Kudu) as it reached EOL
Reached EOL on July 20, 2023:
https://lists.ubuntu.com/archives/ubuntu-announce/2023-July/000293.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-29 17:30:46 +02:00
Bjorn Neergaard 52080d0ae6
Merge pull request #926 from neersighted/upstream_init
deb: use upstream init script
2023-07-21 11:38:44 -06:00
Bjorn Neergaard 2d70345542
deb: use upstream init defaults
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-21 10:57:57 -06:00
Bjorn Neergaard e2a08ee007
deb: use upstream init script
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-21 10:57:55 -06:00
Bjorn Neergaard 022ee4ab56
Merge pull request #914 from thaJeztah/debhelper_update_take_2
[master] Update "deb" packaging to use "dh_installsystemd", and remove upstart script
2023-07-21 06:24:52 -06:00
Sebastiaan van Stijn 5c01d5bcce
Update "deb" packaging to use "dh_installsystemd"
This reverts commit cafc21c4f6.

This also removes the now-obsolete upstart script and updates the
"debhelper compat level" to 12 (which necessitates adding "override_dh_dwz"
-- safe to remove once we can update to debhelper-compat 13+).

(See also https://lists.debian.org/debian-devel-announce/2020/02/msg00000.html)

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-07-20 15:25:33 -06:00
Bjorn Neergaard fc2bbace11
Merge pull request #924 from glours/bump-compose-2.20.2
bump compose to v2.20.2
2023-07-19 13:33:33 -06:00
Guillaume Lours cc74e868e8
bump compose version to v2.20.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-07-19 10:01:26 -06:00
Bjorn Neergaard 95e1224390
Merge pull request #921 from thaJeztah/update_go_1.20.6
[master] update go to go1.20.6
2023-07-18 18:01:58 -06:00
Sebastiaan van Stijn 771e59e20b
update go to go1.20.6
go1.20.6 (released 2023-07-11) includes a security fix to the net/http package,
as well as bug fixes to the compiler, cgo, the cover tool, the go command,
the runtime, and the crypto/ecdsa, go/build, go/printer, net/mail, and text/template
packages. See the Go 1.20.6 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.20.6+label%3ACherryPickApproved

Full diff: https://github.com/golang/go/compare/go1.20.5...go1.20.6

These minor releases include 1 security fixes following the security policy:

net/http: insufficient sanitization of Host header

The HTTP/1 client did not fully validate the contents of the Host header.
A maliciously crafted Host header could inject additional headers or entire
requests. The HTTP/1 client now refuses to send requests containing an
invalid Request.Host or Request.URL.Host value.

Thanks to Bartek Nowotarski for reporting this issue.

Includes security fixes for [CVE-2023-29406 ][1] and Go issue https://go.dev/issue/60374

[1]: https://github.com/advisories/GHSA-f8f7-69v5-w4vx

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 00:10:43 +02:00
Sebastiaan van Stijn 9c77ee4fc6
Merge pull request #923 from milas/main-compose-2.20.1
[master] update compose to v2.20.1
2023-07-19 00:02:09 +02:00
Milas Bowman 2226a01a22 update compose to v2.20.1
https://github.com/docker/compose/releases/tag/v2.20.1

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-07-18 17:06:20 -04:00
Sebastiaan van Stijn 712035b799
Merge pull request #922 from crazy-max/update-buildx
update buildx to v0.11.2
2023-07-18 19:33:28 +02:00
CrazyMax 38fe455661
update buildx to v0.11.2
release notes: https://github.com/docker/buildx/releases/tag/v0.11.2

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-07-18 18:35:44 +02:00
Bjorn Neergaard 2ab83ea024
Merge pull request #920 from glours/bump-compose-2.20.0
bump compose version to v2.20.0
2023-07-11 07:48:07 -06:00
Guillaume Lours 55770fb650
bump compose version to v2.20.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-07-11 15:30:03 +02:00
Bjorn Neergaard 974f151ee1
Merge pull request #918 from jedevc/update-buildx-v0.11.1
[master] update buildx to v0.11.1
2023-07-05 11:32:13 -06:00
Justin Chadwell 46a8aa5487 update buildx to v0.11.1
release notes: https://github.com/docker/buildx/releases/tag/v0.11.1

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-07-05 14:29:43 +01:00
Sebastiaan van Stijn e847c61a41
Merge pull request #916 from milas/compose-2.19.1
bump compose version to v2.19.1
2023-06-30 19:09:04 +02:00
Milas Bowman f0d55cc963 bump compose version to v2.19.1
https://github.com/docker/compose/releases/tag/v2.19.1

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-06-30 12:47:27 -04:00
Sebastiaan van Stijn b784ef8ccf
Merge pull request #913 from thaJeztah/dockerfile_improve 2023-06-22 00:00:39 +02:00
Sebastiaan van Stijn 8ee6e27ef7
Merge pull request #911 from thaJeztah/remove_bionic 2023-06-21 23:59:48 +02:00
Sebastiaan van Stijn 297fa1524d
Update dockerfiles to use COPY --link
Use COPY --link for steps that don't depend on the base image
or prior steps, to allow for better sharing of build-cache.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-21 23:37:18 +02:00
Sebastiaan van Stijn 77c4f7fde9
remove Ubuntu 18.04 Bionic Beaver LTS, as it reached end of standard support
Ubuntu 18.04 LTS reached end of standard support. Expanded Security Maintenance
(ESM) is available, but requires a subscription, and we don't provide packages
for those.

- https://wiki.ubuntu.com/Releases
- https://ubuntu.com//blog/18-04-end-of-standard-support

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-21 22:37:02 +02:00
Sebastiaan van Stijn b62b8ab3bf
Merge pull request #909 from thaJeztah/no_more_buster
[master] deb, rpm: update golang image to use bookworm instead of buster
2023-06-21 18:40:57 +02:00
Sebastiaan van Stijn b09da57452
Merge pull request #906 from glours/bump-compose-2.19.0 2023-06-21 16:56:00 +02:00
Sebastiaan van Stijn 46f56f2720
deb, rpm: update golang image to use bookworm instead of buster
While we only use the golang binaries from these images (which should be
the same for both), Debian buster reached EOL. Update the Golang image
to the current stable version of Debian (Debian 12 "bookworm")

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-21 16:17:26 +02:00
Sebastiaan van Stijn c6f5066cb2
Merge pull request #904 from thaJeztah/update_go_1.20.5 2023-06-21 15:46:17 +02:00
Guillaume Lours 6afed50ff6
bump compose version to v2.19.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-06-21 13:52:55 +02:00
Sebastiaan van Stijn ec6799b957
update go to go1.20.5
go1.20.5 (released 2023-06-06) includes four security fixes to the cmd/go and
runtime packages, as well as bug fixes to the compiler, the go command, the
runtime, and the crypto/rsa, net, and os packages. See the Go 1.20.5 milestone
on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.20.5+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.20.4...go1.20.5

These minor releases include 3 security fixes following the security policy:

- cmd/go: cgo code injection
  The go command may generate unexpected code at build time when using cgo. This
  may result in unexpected behavior when running a go program which uses cgo.

  This may occur when running an untrusted module which contains directories with
  newline characters in their names. Modules which are retrieved using the go command,
  i.e. via "go get", are not affected (modules retrieved using GOPATH-mode, i.e.
  GO111MODULE=off, may be affected).

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-29402 and Go issue https://go.dev/issue/60167.

- runtime: unexpected behavior of setuid/setgid binaries

  The Go runtime didn't act any differently when a binary had the setuid/setgid
  bit set. On Unix platforms, if a setuid/setgid binary was executed with standard
  I/O file descriptors closed, opening any files could result in unexpected
  content being read/written with elevated prilieges. Similarly if a setuid/setgid
  program was terminated, either via panic or signal, it could leak the contents
  of its registers.

  Thanks to Vincent Dehors from Synacktiv for reporting this issue.

  This is CVE-2023-29403 and Go issue https://go.dev/issue/60272.

- cmd/go: improper sanitization of LDFLAGS

  The go command may execute arbitrary code at build time when using cgo. This may
  occur when running "go get" on a malicious module, or when running any other
  command which builds untrusted code. This is can by triggered by linker flags,
  specified via a "#cgo LDFLAGS" directive.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2023-29404 and CVE-2023-29405 and Go issues https://go.dev/issue/60305 and https://go.dev/issue/60306.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-06-20 23:55:19 +02:00
Sebastiaan van Stijn 4738501013
Merge pull request #902 from jedevc/update-buildx-v0.11.0
[master] update buildx to v0.11.0
2023-06-14 11:05:22 +02:00
Justin Chadwell b3dd753f14 update buildx to v0.11.0
release notes: https://github.com/docker/buildx/releases/tag/v0.11.0

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-06-13 15:29:48 +01:00
Bjorn Neergaard e43fbd37e4
Merge pull request #894 from thaJeztah/remove_fedora_36
[master] remove Fedora 36, as it reached EOL
2023-06-02 05:51:37 -06:00
Sebastiaan van Stijn cfc8dadce6
Merge pull request #900 from crazy-max/update-buildx
[master] update buildx to v0.10.5
2023-05-23 11:36:51 +02:00
CrazyMax 48a58eafd7
update buildx to v0.10.5
full diff: https://github.com/docker/buildx/compare/v0.10.4...v0.10.5

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-05-23 10:54:32 +02:00
Sebastiaan van Stijn 78f385d316
Merge pull request #896 from milas/compose-2.18.1
[master] bump compose to v2.18.1
2023-05-18 23:13:51 +02:00
Milas Bowman cdeef5a312 bump compose to v2.18.1
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-05-17 13:22:42 -04:00
Sebastiaan van Stijn ed8b0461ff
remove Fedora 36, as it reached EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-16 17:12:27 +01:00
Sebastiaan van Stijn dcebf9d2dc
Merge pull request #888 from thaJeztah/update_go1.20.4
[master] update go to go1.20.4
2023-05-04 12:51:42 +02:00
Sebastiaan van Stijn fba8c77f41
update go to go1.20.4
go1.20.4 (released 2023-05-02) includes three security fixes to the html/template
package, as well as bug fixes to the compiler, the runtime, and the crypto/subtle,
crypto/tls, net/http, and syscall packages. See the Go 1.20.4 milestone on our
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.20.4+label%3ACherryPickApproved

release notes: https://go.dev/doc/devel/release#go1.20.4
full diff: https://github.com/golang/go/compare/go1.20.3...go1.20.4

from the announcement:

> These minor releases include 3 security fixes following the security policy:
>
> - html/template: improper sanitization of CSS values
>
>   Angle brackets (`<>`) were not considered dangerous characters when inserted
>   into CSS contexts. Templates containing multiple actions separated by a '/'
>   character could result in unexpectedly closing the CSS context and allowing
>   for injection of unexpected HMTL, if executed with untrusted input.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-24539 and Go issue https://go.dev/issue/59720.
>
> - html/template: improper handling of JavaScript whitespace
>
>   Not all valid JavaScript whitespace characters were considered to be
>   whitespace. Templates containing whitespace characters outside of the character
>   set "\t\n\f\r\u0020\u2028\u2029" in JavaScript contexts that also contain
>   actions may not be properly sanitized during execution.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-24540 and Go issue https://go.dev/issue/59721.
>
> - html/template: improper handling of empty HTML attributes
>
>   Templates containing actions in unquoted HTML attributes (e.g. "attr={{.}}")
>   executed with empty input could result in output that would have unexpected
>   results when parsed due to HTML normalization rules. This may allow injection
>   of arbitrary attributes into tags.
>
>   Thanks to Juho Nurminen of Mattermost for reporting this issue.
>
>   This is CVE-2023-29400 and Go issue https://go.dev/issue/59722.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-03 21:08:30 +02:00
Sebastiaan van Stijn 5f4a1b200f
Merge pull request #803 from thaJeztah/start_testing_fedora38
[master] Start testing builds for Fedora 38 (not yet released)
2023-04-25 12:21:50 +02:00
Sebastiaan van Stijn cf2ab34b4f
Add Fedora 38 (current stable).
Should close 881.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2023-04-24 10:19:45 +02:00
Sebastiaan van Stijn f13c95412b
Merge pull request #882 from ndeloof/compose-v2.17.3
bump compose to v2.17.3
2023-04-21 11:43:10 +02:00
Nicolas De Loof 1676eb307e
bump compose to v2.17.3
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-04-20 15:00:36 +02:00
Tianon Gravi 0a799b452b
Merge pull request #877 from thaJeztah/bump_go1.20.3
[master] update go to go1.20.3
2023-04-05 15:30:41 -07:00
Sebastiaan van Stijn 46f7399fb5
update go to go1.20.3
go1.20.3 (released 2023-04-04) includes security fixes to the go/parser,
html/template, mime/multipart, net/http, and net/textproto packages, as well
as bug fixes to the compiler, the linker, the runtime, and the time package.
See the Go 1.20.3 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.20.3+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.20.2...go1.20.3

Further details from the announcement on the mailing list:

We have just released Go versions 1.20.3 and 1.19.8, minor point releases.
These minor releases include 4 security fixes following the security policy:

- go/parser: infinite loop in parsing

  Calling any of the Parse functions on Go source code which contains `//line`
  directives with very large line numbers can cause an infinite loop due to
  integer overflow.
  Thanks to Philippe Antoine (Catena cyber) for reporting this issue.
  This is CVE-2023-24537 and Go issue https://go.dev/issue/59180.

- html/template: backticks not treated as string delimiters

  Templates did not properly consider backticks (`) as Javascript string
  delimiters, and as such did not escape them as expected. Backticks are
  used, since ES6, for JS template literals. If a template contained a Go
  template action within a Javascript template literal, the contents of the
  action could be used to terminate the literal, injecting arbitrary Javascript
  code into the Go template.

  As ES6 template literals are rather complex, and themselves can do string
  interpolation, we've decided to simply disallow Go template actions from being
  used inside of them (e.g. "var a = {{.}}"), since there is no obviously safe
  way to allow this behavior. This takes the same approach as
  github.com/google/safehtml. Template.Parse will now return an Error when it
  encounters templates like this, with a currently unexported ErrorCode with a
  value of 12. This ErrorCode will be exported in the next major release.

  Users who rely on this behavior can re-enable it using the GODEBUG flag
  jstmpllitinterp=1, with the caveat that backticks will now be escaped. This
  should be used with caution.

  Thanks to Sohom Datta, Manipal Institute of Technology, for reporting this issue.

  This is CVE-2023-24538 and Go issue https://go.dev/issue/59234.

- net/http, net/textproto: denial of service from excessive memory allocation

  HTTP and MIME header parsing could allocate large amounts of memory, even when
  parsing small inputs.

  Certain unusual patterns of input data could cause the common function used to
  parse HTTP and MIME headers to allocate substantially more memory than
  required to hold the parsed headers. An attacker can exploit this behavior to
  cause an HTTP server to allocate large amounts of memory from a small request,
  potentially leading to memory exhaustion and a denial of service.
  Header parsing now correctly allocates only the memory required to hold parsed
  headers.

  Thanks to Jakob Ackermann (@das7pad) for discovering this issue.

  This is CVE-2023-24534 and Go issue https://go.dev/issue/58975.

- net/http, net/textproto, mime/multipart: denial of service from excessive resource consumption

  Multipart form parsing can consume large amounts of CPU and memory when
  processing form inputs containing very large numbers of parts. This stems from
  several causes:

  mime/multipart.Reader.ReadForm limits the total memory a parsed multipart form
  can consume. ReadForm could undercount the amount of memory consumed, leading
  it to accept larger inputs than intended. Limiting total memory does not
  account for increased pressure on the garbage collector from large numbers of
  small allocations in forms with many parts. ReadForm could allocate a large
  number of short-lived buffers, further increasing pressure on the garbage
  collector. The combination of these factors can permit an attacker to cause an
  program that parses multipart forms to consume large amounts of CPU and
  memory, potentially resulting in a denial of service. This affects programs
  that use mime/multipart.Reader.ReadForm, as well as form parsing in the
  net/http package with the Request methods FormFile, FormValue,
  ParseMultipartForm, and PostFormValue.

  ReadForm now does a better job of estimating the memory consumption of parsed
  forms, and performs many fewer short-lived allocations.

  In addition, mime/multipart.Reader now imposes the following limits on the
  size of parsed forms:

  Forms parsed with ReadForm may contain no more than 1000 parts. This limit may
  be adjusted with the environment variable GODEBUG=multipartmaxparts=. Form
  parts parsed with NextPart and NextRawPart may contain no more than 10,000
  header fields. In addition, forms parsed with ReadForm may contain no more
  than 10,000 header fields across all parts. This limit may be adjusted with
  the environment variable GODEBUG=multipartmaxheaders=.

  Thanks to Jakob Ackermann for discovering this issue.

  This is CVE-2023-24536 and Go issue https://go.dev/issue/59153.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-05 15:10:17 +02:00
Sebastiaan van Stijn 732726ce66
Merge pull request #875 from thaJeztah/add_ubuntu_lunar_lobster_23.04
[master] Add Ubuntu 23.04 "Lunar Lobster"
2023-04-01 02:44:13 +02:00
Sebastiaan van Stijn e299096810
Add Ubuntu 23.04 "Lunar Lobster"
Ubuntu 23.04 is planned to be released on April 20, but final betas
are available now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-01 02:26:05 +02:00
Sebastiaan van Stijn f72343bbca
Merge pull request #870 from thaJeztah/drop_scan
[master] remove recipes for building docker-scan-plugin
2023-03-31 01:03:57 +02:00
Sebastiaan van Stijn c04077c06e
Merge pull request #869 from thaJeztah/bump_go1.20
[master] update to go1.20.2
2023-03-31 00:12:42 +02:00
Sebastiaan van Stijn 71129c10ca
remove recipes for building docker-scan-plugin
docker scan was deprecated in favor of docker scout, so we can stop
building it as part of the 24.0 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-30 23:26:27 +02:00
Sebastiaan van Stijn cd5d37bd74
update to go1.20.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-30 23:11:28 +02:00
Sebastiaan van Stijn ad5b3f9207
Merge pull request #868 from tianon/libexec-docker-init
Move "docker-init" into appropriate "libexec" directory
2023-03-30 18:44:23 +02:00
Tianon Gravi 5a998af6f5 Move "docker-init" into appropriate "libexec" directory
See 6caaa8cadc

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2023-03-29 10:29:00 -07:00
Sebastiaan van Stijn 0d574bfe74
Merge pull request #866 from thaJeztah/compose_2.17.2
[master] bump compose version to v2.17.2
2023-03-27 17:15:04 +02:00
Sebastiaan van Stijn 5e20a7d5b1
bump compose version to v2.17.2
https://github.com/docker/compose/releases/tag/v2.17.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-27 09:59:03 +02:00
Sebastiaan van Stijn 902cb8bce7
Merge pull request #863 from milas/compose-2.17.1
[master] bump compose version to v2.17.1
2023-03-25 18:34:07 +01:00
Milas Bowman 4e31bd971a bump compose version to v2.17.1
https://github.com/docker/compose/releases/tag/v2.17.1

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2023-03-24 14:53:01 -04:00
Sebastiaan van Stijn 3b53ed9d4b
Merge pull request #860 from glours/bump-compose-2.17.0
[master] bump compose version to v2.17.0
2023-03-22 15:00:00 +01:00
Guillaume Lours f1df0f5f9b
bump compose version to v2.17.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-03-22 14:36:53 +01:00
Sebastiaan van Stijn 3babbbee3f
Merge pull request #854 from thaJeztah/bump_go1.19.7
[master] update to go1.19.7
2023-03-10 12:55:01 +01:00
Sebastiaan van Stijn 1e18321167
update to go1.19.7
Includes a security fix for crypto/elliptic (CVE-2023-24532).

> go1.19.7 (released 2023-03-07) includes a security fix to the crypto/elliptic
> package, as well as bug fixes to the linker, the runtime, and the crypto/x509
> and syscall packages. See the Go 1.19.7 milestone on our issue tracker for
> details.

https://go.dev/doc/devel/release#go1.19.minor

From the announcement:

> We have just released Go versions 1.20.2 and 1.19.7, minor point releases.
>
> These minor releases include 1 security fixes following the security policy:
>
> - crypto/elliptic: incorrect P-256 ScalarMult and ScalarBaseMult results
    >
    >   The ScalarMult and ScalarBaseMult methods of the P256 Curve may return an
    >   incorrect result if called with some specific unreduced scalars (a scalar larger
    >   than the order of the curve).
    >
    >   This does not impact usages of crypto/ecdsa or crypto/ecdh.
>
> This is CVE-2023-24532 and Go issue https://go.dev/issue/58647.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-10 10:39:30 +01:00
Sebastiaan van Stijn 5005894412
Merge pull request #853 from crazy-max/update-buildx
[master] update buildx to v0.10.4
2023-03-10 10:39:11 +01:00
CrazyMax d1ff577bfc
update buildx to v0.10.4
full diff: https://github.com/docker/buildx/compare/v0.10.3...v0.10.4

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-03-10 09:49:25 +01:00
Sebastiaan van Stijn 0d40988074
Merge pull request #849 from thaJeztah/bump_go_1.19.6
[master] update to go1.19.6
2023-03-02 17:45:05 +01:00
Mário Santos 5286ca46ce
Add docker.socket to the %preun section
Signed-off-by: Mário Santos <mario.rf.santos@gmail.com>
2023-02-23 22:49:43 +00:00
Sebastiaan van Stijn 9b7e7157b9
update to go1.19.6
go1.19.6 (released 2023-02-14) includes security fixes to the crypto/tls,
mime/multipart, net/http, and path/filepath packages, as well as bug fixes to
the go command, the linker, the runtime, and the crypto/x509, net/http, and
time packages. See the Go 1.19.6 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.19.6+label%3ACherryPickApproved

From the announcement on the security mailing:

We have just released Go versions 1.20.1 and 1.19.6, minor point releases.

These minor releases include 4 security fixes following the security policy:

- path/filepath: path traversal in filepath.Clean on Windows

  On Windows, the filepath.Clean function could transform an invalid path such
  as a/../c:/b into the valid path c:\b. This transformation of a relative (if
  invalid) path into an absolute path could enable a directory traversal attack.
  The filepath.Clean function will now transform this path into the relative
  (but still invalid) path .\c:\b.

  This is CVE-2022-41722 and Go issue https://go.dev/issue/57274.

- net/http, mime/multipart: denial of service from excessive resource
  consumption

  Multipart form parsing with mime/multipart.Reader.ReadForm can consume largely
  unlimited amounts of memory and disk files. This also affects form parsing in
  the net/http package with the Request methods FormFile, FormValue,
  ParseMultipartForm, and PostFormValue.

  ReadForm takes a maxMemory parameter, and is documented as storing "up to
  maxMemory bytes +10MB (reserved for non-file parts) in memory". File parts
  which cannot be stored in memory are stored on disk in temporary files. The
  unconfigurable 10MB reserved for non-file parts is excessively large and can
  potentially open a denial of service vector on its own. However, ReadForm did
  not properly account for all memory consumed by a parsed form, such as map
  ntry overhead, part names, and MIME headers, permitting a maliciously crafted
  form to consume well over 10MB. In addition, ReadForm contained no limit on
  the number of disk files created, permitting a relatively small request body
  to create a large number of disk temporary files.

  ReadForm now properly accounts for various forms of memory overhead, and
  should now stay within its documented limit of 10MB + maxMemory bytes of
  memory consumption. Users should still be aware that this limit is high and
  may still be hazardous.

  ReadForm now creates at most one on-disk temporary file, combining multiple
  form parts into a single temporary file. The mime/multipart.File interface
  type's documentation states, "If stored on disk, the File's underlying
  concrete type will be an *os.File.". This is no longer the case when a form
  contains more than one file part, due to this coalescing of parts into a
  single file. The previous behavior of using distinct files for each form part
  may be reenabled with the environment variable
  GODEBUG=multipartfiles=distinct.

  Users should be aware that multipart.ReadForm and the http.Request methods
  that call it do not limit the amount of disk consumed by temporary files.
  Callers can limit the size of form data with http.MaxBytesReader.

  This is CVE-2022-41725 and Go issue https://go.dev/issue/58006.

- crypto/tls: large handshake records may cause panics

  Both clients and servers may send large TLS handshake records which cause
  servers and clients, respectively, to panic when attempting to construct
  responses.

  This affects all TLS 1.3 clients, TLS 1.2 clients which explicitly enable
  session resumption (by setting Config.ClientSessionCache to a non-nil value),
  and TLS 1.3 servers which request client certificates (by setting
  Config.ClientAuth
  > = RequestClientCert).

  This is CVE-2022-41724 and Go issue https://go.dev/issue/58001.

- net/http: avoid quadratic complexity in HPACK decoding

  A maliciously crafted HTTP/2 stream could cause excessive CPU consumption
  in the HPACK decoder, sufficient to cause a denial of service from a small
  number of small requests.

  This issue is also fixed in golang.org/x/net/http2 v0.7.0, for users manually
  configuring HTTP/2.

  This is CVE-2022-41723 and Go issue https://go.dev/issue/57855.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-17 01:07:37 +01:00
Sebastiaan van Stijn 5cf9d29dd2
Merge pull request #846 from crazy-max/update-buildx
update buildx to v0.10.3
2023-02-16 23:10:01 +01:00
CrazyMax ec8cadf15d
update buildx to v0.10.3
full diff: https://github.com/docker/buildx/compare/v0.10.2...v0.10.3

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-16 19:15:25 +01:00
Sebastiaan van Stijn 3c20db63ac
Merge pull request #843 from glours/bump-compose-2.16.0
[master] bump compose version to v2.16.0
2023-02-08 14:40:04 +01:00
Guillaume Lours ea3720b0c0
bump compose version to v2.16.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-02-08 13:51:12 +01:00
Sebastiaan van Stijn ef137ac78e
Merge pull request #841 from thaJeztah/add_etc_docker
[master] deb, rpm: add /etc/docker directory
2023-02-07 23:29:51 +01:00
Sebastiaan van Stijn bfab8ec652
deb, rpm: add /etc/docker directory
Previous versions of the engine created this directory as a side-effect of the
(legacy) "key.json" file. With the removal of libtrust (and the key.json) file,
that directory is no longer created.

While the precence of this directory is not needed for the daemon to function,
users may expect it to be there, so it there should be no harm in creating it.

For scripting purposes, users are still recommended to check if the directory
exists or to create it (mkdir -p).

This patch adds a .dirs file to create the directory on installation for .deb;
https://www.debian.org/doc/manuals/maint-guide/dother.en.html#dirs

And adds a %dirs directive for .rpm packages:
http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-DIR-DIRECTIVE

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-07 23:12:32 +01:00
Sebastiaan van Stijn 732208e0fd
Merge pull request #840 from Romain-Geissler-1A/master
[master] update buildx to v0.10.2
2023-01-31 14:42:40 +01:00
Sebastiaan van Stijn 9791c08476
Merge pull request #838 from thaJeztah/add_debian_bookworm
deb: add Debian / Raspbian 12 "bookworm" (next stable)
2023-01-31 14:41:43 +01:00
Romain Geissler fa5dca20a1 update buildx to v0.10.2
full diff: https://github.com/docker/buildx/compare/v0.10.1...v0.10.2

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2023-01-31 09:43:41 +00:00
Sebastiaan van Stijn 0348022bd6
deb: add Debian / Raspbian 12 "bookworm" (next stable)
Not yet released, but freeze was announced;
https://lists.debian.org/debian-devel-announce/2023/01/msg00004.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-30 19:01:45 +01:00
Sebastiaan van Stijn 10a8d82925
Merge pull request #836 from thaJeztah/buildx_0.10.1
[master] update buildx to v0.10.1
2023-01-27 16:38:16 +01:00
Sebastiaan van Stijn b554602593
update buildx to v0.10.1
full diff: https://github.com/docker/buildx/compare/v0.10.0...v0.10.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-27 14:28:55 +01:00
Sebastiaan van Stijn 710a8db654
Merge pull request #830 from thaJeztah/remove_btrfs_headers
[master] remove libbtrfs-dev, btrfs-tools, btrfs-progs-devel build-dependencies
2023-01-17 10:32:11 +01:00
Sebastiaan van Stijn 1e630e1511
Remove libbtrfs-dev, btrfs-tools, btrfs-progs-devel build-dependencies
Starting with 6834304feb,
building the engine no longer requires these headers, as it now uses the
kernel UAPI, which means we no longer need these packages as dependency.

Note that the static builds may still need them for containerd, but
dependencies for static builds are defined in the Dockerfile (containerd
is also in the process of migrating to use the kernel UAPI).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-12 13:34:50 +01:00
Sebastiaan van Stijn 153875c148
Merge pull request #828 from thaJeztah/hyphens_arent_tildes
[master] deb: fix hyphen instead of tilde in buildx and compose
2023-01-12 00:28:06 +01:00
Sebastiaan van Stijn 9e92e21243
deb: compose: fix hyphen instead of tilde
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-12 00:07:35 +01:00
Sebastiaan van Stijn e270671da8
deb: buildx: fix hyphen instead of tilde
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-12 00:06:43 +01:00
Sebastiaan van Stijn 7855700bef
Merge pull request #822 from thaJeztah/plugins_include_distro
[master] deb: buildx, compose: include packaging revision and distro version in version
2023-01-11 21:25:08 +01:00
Sebastiaan van Stijn cdca6d2276
deb: compose: include packaging revision and distro version in version
Aligning the plugin's version with the format used for docker-ce and
docker-ce-cli, as updated in 39772a761d

Before this patch:

    deb/debbuild/
    └── ubuntu-jammy
        ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb
        ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb

With this patch:

    deb/debbuild/
    └── ubuntu-jammy
        ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb
        ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        └── docker-compose-plugin_2.15.1-1~ubuntu.22.04-jammy_arm64.deb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 20:25:02 +01:00
Sebastiaan van Stijn a08b6b4a31
deb: buildx: include packaging revision and distro version in version
Aligning the plugin's version with the format used for docker-ce and
docker-ce-cli, as updated in 39772a761d

Before this patch:

    tree deb/debbuild/
    deb/debbuild/
    └── ubuntu-jammy
        ├── docker-buildx-plugin_0.10.0~ubuntu-jammy_arm64.deb
        ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb

With this patch:

    deb/debbuild/
    └── ubuntu-jammy
        ├── docker-buildx-plugin_0.10.0-1~ubuntu.22.04-jammy_arm64.deb
        ├── docker-ce-cli_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce-rootless-extras_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        ├── docker-ce_23.0.0~rc.2-1~ubuntu.22.04~jammy_arm64.deb
        └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 20:24:53 +01:00
Sebastiaan van Stijn 3e7b469e3c
deb: introduce PKG_REVISION variable
This variable can be used as packaging-revision in package versions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 20:24:11 +01:00
Sebastiaan van Stijn ce7b189e14
Merge pull request #818 from thaJeztah/move_pkgrevision
[master] deb: move packaging revision before distro information
2023-01-11 19:18:56 +01:00
Sebastiaan van Stijn 39772a761d
deb: move packaging revision before distro information
Commit f8299f2021 introduced the `$pkgRevision`
in the package version, but we now actually had two separate escape hatches
for when we needed to do a packaging-only update; one before the packaging
version, and one after the distro-ID (VERSION_ID). The latter one was confusing,
as it appeared to be part of the distro-version (e.g. `22.04.0`).

This patch removes the additional version, and moves it to the start, and updates
the default to use "1", which aligns with the "_release" used for RPM packages,
and may help with warnings that the package version is not an "upstream" (debian)
version.

Comparing same version old vs new (works because we now use 1 as default):

    dpkg --compare-versions "23.0.0~rc.1-1~ubuntu.22.04~jammy" ">>" "23.0.0~rc.1-0~ubuntu.22.04.0~jammy" && echo "OK" || echo "KO"
    OK

Comparing newer version (new format) vs older version (old format) is ok:

    dpkg --compare-versions "23.0.0~rc.2-1~ubuntu.22.04~jammy" ">>" "23.0.0~rc.1-0~ubuntu.22.04.0~jammy" && echo "OK" || echo "KO"
    OK

Comparing same version, but newer $pkgRevision (either new format <-> old-format,
or new-format <-> new-format) is also ok:

    dpkg --compare-versions "23.0.0~rc.1-2~ubuntu.22.04~jammy" ">>" "23.0.0~rc.1-1~ubuntu.22.04~jammy" && echo "OK" || echo "KO"
    OK

    dpkg --compare-versions "23.0.0~rc.1-2~ubuntu.22.04~jammy" ">>" "23.0.0~rc.1-1~ubuntu.22.04.0~jammy" && echo "OK" || echo "KO"
    OK

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 18:32:37 +01:00
Sebastiaan van Stijn 4609f207f4
Merge pull request #820 from thaJeztah/fix_buildx_version
deb: fix plugin versions to have correct format for deb packages
2023-01-11 17:51:05 +01:00
Sebastiaan van Stijn 55421c152d
Merge pull request #821 from thaJeztah/update_version_examples
update example versions
2023-01-11 17:43:19 +01:00
Sebastiaan van Stijn 5a185c8487
update example versions
Starting with Docker 23.0.0, we're moving away from CalVer, instead
using SemVer(ish) versions. This aptch updates some examples used to
match the new format.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 17:17:20 +01:00
Sebastiaan van Stijn e8d994c332
deb: fix plugin versions to have correct format for deb packages
We already had code for this in the RPM packages, but were missing this
in the deb variants. Because of this, pre-release packages used a hyphen
(-) as separator for pre-releases, which get sorted as a "higher" version
than a non-pre-release:

    dpkg --compare-versions "0.10.0" ">>" "0.10.0-rc2" && echo "OK" || echo "KO"
    KO

With this patch, the packages have a correctly formatted version, using
a tilde (~) as separator for the pre-release suffix:

    make DOCKER_CLI_REF=f163d2441e214176db89c63ffc557012113e28d8 DOCKER_ENGINE_REF=9fd3a437a6027637301b0952f7578644d7dff321 VERSION=23.0.0-rc.2 ubuntu-jammy

    tree deb/debbuild/
    deb/debbuild/
    └── ubuntu-jammy
        ├── docker-buildx-plugin_0.10.0~rc2~ubuntu-jammy_arm64.deb
        ├── docker-ce-cli_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
        ├── docker-ce-rootless-extras_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
        ├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy.dsc
        ├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy.tar.gz
        ├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.buildinfo
        ├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.changes
        ├── docker-ce_23.0.0~rc.2-0~ubuntu.22.04.0~jammy_arm64.deb
        └── docker-compose-plugin_2.15.1~ubuntu-jammy_arm64.deb

Using a tilde makes sure that pre-releases are sorted correctly:

    dpkg --compare-versions "0.10.0" ">>" "0.10.0~rc2" && echo "OK" || echo "KO"
    OK

The version reported through `docker buildx version` still uses the version
as tagged in the repository (using a hyphen (-));

    make IMAGE=ubuntu:jammy verify

    + verify_binaries
    ...
    + docker buildx version
    github.com/docker/buildx v0.10.0-rc2 64e4c19
    ...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 16:50:51 +01:00
Sebastiaan van Stijn 83875a4c2a
Merge pull request #819 from thaJeztah/verify_more_binaries
verify: check more binaries
2023-01-11 16:28:07 +01:00
Sebastiaan van Stijn 6e7d527095
Merge pull request #815 from thaJeztah/bump_go_1.19.5
[master] update to go1.19.5
2023-01-11 16:13:16 +01:00
Sebastiaan van Stijn f1f6f220e6
verify: check more binaries
This verification is still very "bare boned", but makes sure that
the binaries are not completely defunct, and that installation of
the package installs the expected binaries.

    make IMAGE=ubuntu:jammy verify
    # ...

    + verify_binaries
    + docker --version
    Docker version 23.0.0-rc.2, build f163d24
    ++ uname -m
    + '[' aarch64 = x86_64 ']'
    + docker buildx version
    github.com/docker/buildx v0.10.0 8764628
    + docker compose version
    Docker Compose version v2.15.1
    + dockerd --version
    Docker version 23.0.0-rc.2, build 9fd3a437
    + docker-proxy --version
    docker-proxy (commit 9fd3a437) version 23.0.0-rc.2
    + containerd --version
    containerd containerd.io 1.6.15 5b842e528e99d4d4c1686467debf2bd4b88ecd86
    + ctr --version
    ctr containerd.io 1.6.15
    + containerd-shim --help
    Usage of containerd-shim:
      -address string
            grpc address back to main containerd
      -containerd-binary containerd publish
            path to containerd binary (used for containerd publish) (default "containerd")
      -criu string
            path to criu binary
      -debug
            enable debug output in logs
      -namespace string
            namespace that owns the shim
      -runtime-root string
            root directory for the runtime (default "/run/containerd/runc")
      -socket string
            socket path to serve
      -systemd-cgroup
            set runtime to use systemd-cgroup
      -workdir string
            path used to storge large temporary data
    + containerd-shim-runc-v1 -v
    containerd-shim-runc-v1:
      Version:  1.6.15
      Revision: 5b842e528e99d4d4c1686467debf2bd4b88ecd86
      Go version: go1.18.9

    + containerd-shim-runc-v2 -v
    containerd-shim-runc-v2:
      Version:  1.6.15
      Revision: 5b842e528e99d4d4c1686467debf2bd4b88ecd86
      Go version: go1.18.9

    + runc --version
    runc version 1.1.4
    commit: v1.1.4-0-g5fd4c4d
    spec: 1.0.2-dev
    go: go1.18.9
    libseccomp: 2.5.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 16:04:03 +01:00
Sebastiaan van Stijn f0a887dd90
Merge pull request #817 from thaJeztah/deb_changes
deb: cleanup makefile, remove unused GITCOMMIT, and pass VERSION_ID through Dockerfile
2023-01-11 13:38:19 +01:00
Sebastiaan van Stijn e1551c7ca1
deb: pass VERSION_ID through Dockerfile
We'll be using VERSION_ID in other places, so adding it in the Dockerfile makes
sure it's always present, without having to depend on /etc/os-release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 12:23:30 +01:00
Sebastiaan van Stijn 0f8737cc3c
deb: Makefile: sort vars similar to rpm variant
For easier comparing :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 10:36:50 +01:00
Sebastiaan van Stijn e49e4d76fa
deb: remove unused GITCOMMIT make var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 10:31:30 +01:00
Sebastiaan van Stijn 07134d053d
update to go1.19.5
go1.19.5 (released 2023-01-10) includes fixes to the compiler, the linker,
and the crypto/x509, net/http, sync/atomic, and syscall packages. See the
Go 1.19.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.19.5+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.19.4...go1.19.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 00:46:17 +01:00
Sebastiaan van Stijn e9ca925920
Merge pull request #812 from thaJeztah/buildx_0.10
[master] update buildx to v0.10.0
2023-01-10 10:29:31 +01:00
Sebastiaan van Stijn 67cf3d9e05
update buildx to v0.10.0
- release notes: https://github.com/docker/buildx/releases/tag/v0.10.0
- full diff: https://github.com/docker/buildx/compare/v0.10.0-rc2...v0.10.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-10 09:34:42 +01:00
Sebastiaan van Stijn da87a4a120
Merge pull request #808 from glours/bump-compose-2.15.1
bump Compose version to v2.15.1
2023-01-09 20:39:48 +01:00
Sebastiaan van Stijn d7cbbb0eed
Merge pull request #811 from thaJeztah/remove_btrfs_centos7
rpm: disable btrfs on CentOS 7 / RHEL 7 as it's deprecated
2023-01-09 20:05:31 +01:00
Sebastiaan van Stijn b0cb04ea23
rpm: disable btrfs on CentOS 7 / RHEL 7 as it's deprecated
The `btrfs` storage driver on CentOS and RHEL was provided as a technology preview
by CentOS and RHEL, but has been deprecated since the Red Hat Enterprise Linux 7.4
release:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-btrfs

This patch disables the driver for CentOS 7 (it was already disabled for CentOS
8 and up).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-09 18:56:28 +01:00
Sebastiaan van Stijn fabfce4790
Merge pull request #805 from crazy-max/static-fixes
static: update with latest changes from moby
2023-01-09 16:33:08 +01:00
Guillaume Lours ce65913192
bump Compose version to v2.15.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2023-01-09 15:53:48 +01:00
CrazyMax 1b4f77af16
static: update with latest changes from moby
follow-up https://github.com/moby/moby/pull/44546

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-05 19:23:46 +01:00
CrazyMax e07fd56a51
static: CONTAINERD_COMMIT not used anymore
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-05 19:22:02 +01:00
Sebastiaan van Stijn 47167619d0
Merge pull request #800 from thaJeztah/remove_fedora_35
remove Fedora 35 as it's EOL
2022-12-31 16:53:30 +01:00
Sebastiaan van Stijn bc3ef3bc57
remove Fedora 35 as it's EOL
Fedora 36 reached EOL on December 13;
https://docs.fedoraproject.org/en-US/releases/eol/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-23 00:57:57 +01:00
Sebastiaan van Stijn ff110508ff
Merge pull request #798 from glours/bump-compose-2.14.2
bump Compose version to v2.14.2
2022-12-20 11:29:10 +01:00
Guillaume Lours 83930fcea9
bump Compose version to v2.14.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-20 10:38:24 +01:00
Sebastiaan van Stijn fd0ceae1ba
Merge pull request #797 from thaJeztah/update_buildx2
[master] update buildx to v0.10.0-rc2
2022-12-19 20:54:18 +01:00
Sebastiaan van Stijn eaec202704
update buildx to v0.10.0-rc2
release notes: https://github.com/docker/buildx/releases/tag/v0.10.0-rc2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-19 20:17:15 +01:00
Sebastiaan van Stijn ea970c5811
Merge pull request #794 from thaJeztah/update_buildx
[master] update buildx to v0.10.0-rc1
2022-12-15 18:40:04 +01:00
Sebastiaan van Stijn 1bb7a3309a
update buildx to v0.10.0-rc1
release notes: https://github.com/docker/buildx/releases/tag/v0.10.0-rc1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-15 17:47:04 +01:00
Sebastiaan van Stijn b6ddb81ccc
Merge pull request #796 from glours/bump-compose-2.14.1
bump compose version to v2.14.1
2022-12-15 17:18:53 +01:00
Guillaume Lours c86bb526e2
bump compose version to v2.14.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-12-15 16:51:26 +01:00
Sebastiaan van Stijn 7054d8ef5e
Merge pull request #791 from thaJeztah/update_go_1.19.4
update to go1.19.4
2022-12-07 13:22:14 +01:00
Sebastiaan van Stijn b49a292983
update to go1.19.4
Includes security fixes for net/http (CVE-2022-41717, CVE-2022-41720),
and os (CVE-2022-41720).

These minor releases include 2 security fixes following the security policy:

- os, net/http: avoid escapes from os.DirFS and http.Dir on Windows

  The os.DirFS function and http.Dir type provide access to a tree of files
  rooted at a given directory. These functions permitted access to Windows
  device files under that root. For example, os.DirFS("C:/tmp").Open("COM1")
  would open the COM1 device.
  Both os.DirFS and http.Dir only provide read-only filesystem access.

  In addition, on Windows, an os.DirFS for the directory \(the root of the
  current drive) can permit a maliciously crafted path to escape from the
  drive and access any path on the system.

  The behavior of os.DirFS("") has changed. Previously, an empty root was
  treated equivalently to "/", so os.DirFS("").Open("tmp") would open the
  path "/tmp". This now returns an error.

  This is CVE-2022-41720 and Go issue https://go.dev/issue/56694.

- net/http: limit canonical header cache by bytes, not entries

  An attacker can cause excessive memory growth in a Go server accepting
  HTTP/2 requests.

  HTTP/2 server connections contain a cache of HTTP header keys sent by
  the client. While the total number of entries in this cache is capped,
  an attacker sending very large keys can cause the server to allocate
  approximately 64 MiB per open connection.

  This issue is also fixed in golang.org/x/net/http2 vX.Y.Z, for users
  manually configuring HTTP/2.

  Thanks to Josselin Costanzi for reporting this issue.

  This is CVE-2022-41717 and Go issue https://go.dev/issue/56350.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.19.4

And the milestone on the issue tracker:
https://github.com/golang/go/issues?q=milestone%3AGo1.19.4+label%3ACherryPickApproved

Full diff: https://github.com/golang/go/compare/go1.19.3...go1.19.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-06 23:10:40 +01:00
Sebastiaan van Stijn 89e61edc4d
Merge pull request #789 from milas/compose-2.14.0
[master] compose: bump version to v2.14.0
2022-12-04 19:04:25 +01:00
Milas Bowman 66536b7633 compose: bump version to v2.14.0
https://github.com/docker/compose/releases/tag/v2.14.0

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-12-02 14:36:43 -05:00
Sebastiaan van Stijn 396301be05
Merge pull request #787 from thaJeztah/update_scan_plugin
[master] update scan-cli-plugin to v0.23.0
2022-12-01 12:58:49 +01:00
Sebastiaan van Stijn bbe76c4567
update scan-cli-plugin to v0.23.0
dep: bump snyk to v1.1064.0

full diff: https://github.com/docker/scan-cli-plugin/compare/v0.22.0...v0.23.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-01 11:28:45 +01:00
Sebastiaan van Stijn 4e7653da1d
Merge pull request #785 from glours/bump-compose-version-2.13.0
bump compose version to v2.13.0
2022-11-24 19:46:53 +01:00
Guillaume Lours 10e04ad009
bump compose version to v2.13.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-11-23 16:20:59 +01:00
Sebastiaan van Stijn 30824e0aac
Merge pull request #783 from thaJeztah/update_scan_plugin2
[master] update scan-cli-plugin to v0.22.0
2022-11-17 19:03:26 +01:00
Sebastiaan van Stijn 6096cdbd5c
update scan-cli-plugin to v0.22.0
dep: bump snyk to v1.1054.0

full diff: https://github.com/docker/scan-cli-plugin/compare/v0.21.0...v0.22.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-17 18:44:19 +01:00
Sebastiaan van Stijn 10f1d92fb3
Merge pull request #781 from thaJeztah/bump_go_1.19.3
[master] update to Go 1.19.3 to address CVE-2022-41716
2022-11-12 19:09:47 +01:00
Sebastiaan van Stijn 63e5da90d1
Update to Go 1.19.3 to address CVE-2022-41716
On Windows, syscall.StartProcess and os/exec.Cmd did not properly
    check for invalid environment variable values. A malicious
    environment variable value could exploit this behavior to set a
    value for a different environment variable. For example, the
    environment variable string "A=B\x00C=D" set the variables "A=B" and
    "C=D".

    Thanks to RyotaK (https://twitter.com/ryotkak) for reporting this
    issue.

    This is CVE-2022-41716 and Go issue https://go.dev/issue/56284.

This Go release also fixes https://github.com/golang/go/issues/56309, a
runtime bug which can cause random memory corruption when a goroutine
exits with runtime.LockOSThread() set. This fix is necessary to unblock
work to replace certain uses of pkg/reexec with unshared OS threads.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-05 17:41:47 +01:00
Sebastiaan van Stijn 349567725f
Merge pull request #779 from AkihiroSuda/kinetic
[master] Add Ubuntu 22.10 Kinetic Kudu
2022-10-25 09:51:53 -04:00
Akihiro Suda 02217fb994
Add Ubuntu 22.10 Kinetic Kudu
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-10-25 22:33:53 +09:00
Sebastiaan van Stijn 2884084afd
Merge pull request #776 from milas/compose-2.12.2
[master] compose: upgrade to v2.12.2
2022-10-22 00:14:28 +02:00
Milas Bowman 2952744438 compose: upgrade to v2.12.2
https://github.com/docker/compose/releases/tag/v2.12.2

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-10-21 16:47:24 -04:00
Sebastiaan van Stijn fe42b5bb14
Merge pull request #772 from glours/bump-compose-version-2.12.0
[master] bump Compose version to v2.12.0
2022-10-18 20:07:13 +02:00
Guillaume Lours 1acf9b18ed bump Compose version to v2.12.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-10-18 19:49:08 +02:00
Sebastiaan van Stijn a8c2b796d4
Merge pull request #770 from thaJeztah/update_scan_plugin
update scan-cli-plugin to v0.21.0
2022-10-18 18:08:14 +02:00
Sebastiaan van Stijn a41f520f22
update scan-cli-plugin to v0.21.0
full diff: https://github.com/docker/scan-cli-plugin/compare/v0.17.0...v0.21.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-13 22:51:05 +02:00
Sebastiaan van Stijn c220373258
Merge pull request #768 from thaJeztah/bump_go_1.19.2
Update to go 1.19.2 to address CVE-2022-2879, CVE-2022-2880, CVE-2022-41715
2022-10-04 23:22:09 +02:00
Sebastiaan van Stijn 9d4e2bb39b
Update to go 1.19.2 to address CVE-2022-2879, CVE-2022-2880, CVE-2022-41715
From the mailing list:

We have just released Go versions 1.19.2 and 1.18.7, minor point releases.

These minor releases include 3 security fixes following the security policy:

- archive/tar: unbounded memory consumption when reading headers

  Reader.Read did not set a limit on the maximum size of file headers.
  A maliciously crafted archive could cause Read to allocate unbounded
  amounts of memory, potentially causing resource exhaustion or panics.
  Reader.Read now limits the maximum size of header blocks to 1 MiB.

  Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.

  This is CVE-2022-2879 and Go issue https://go.dev/issue/54853.

- net/http/httputil: ReverseProxy should not forward unparseable query parameters

  Requests forwarded by ReverseProxy included the raw query parameters from the
  inbound request, including unparseable parameters rejected by net/http. This
  could permit query parameter smuggling when a Go proxy forwards a parameter
  with an unparseable value.

  ReverseProxy will now sanitize the query parameters in the forwarded query
  when the outbound request's Form field is set after the ReverseProxy.Director
  function returns, indicating that the proxy has parsed the query parameters.
  Proxies which do not parse query parameters continue to forward the original
  query parameters unchanged.

  Thanks to Gal Goldstein (Security Researcher, Oxeye) and
  Daniel Abeles (Head of Research, Oxeye) for reporting this issue.

  This is CVE-2022-2880 and Go issue https://go.dev/issue/54663.

- regexp/syntax: limit memory used by parsing regexps

  The parsed regexp representation is linear in the size of the input,
  but in some cases the constant factor can be as high as 40,000,
  making relatively small regexps consume much larger amounts of memory.

  Each regexp being parsed is now limited to a 256 MB memory footprint.
  Regular expressions whose representation would use more space than that
  are now rejected. Normal use of regular expressions is unaffected.

  Thanks to Adam Korczynski (ADA Logics) and OSS-Fuzz for reporting this issue.

  This is CVE-2022-41715 and Go issue https://go.dev/issue/55949.

View the release notes for more information: https://go.dev/doc/devel/release#go1.19.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-04 21:12:29 +02:00
Sebastiaan van Stijn afa8f4d9bb
Merge pull request #765 from milas/latest-compose-2.11.2
compose: bump version to v2.11.2
2022-10-03 14:00:42 +02:00
Milas Bowman 4740eec2d1 compose: bump version to v2.11.2
https://github.com/docker/compose/releases/tag/v2.11.2

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
2022-09-30 11:35:13 -04:00
Sebastiaan van Stijn 800eaea291
Merge pull request #763 from glours/bump-compose-version-2.11.0
bump compose version to v2.11.0
2022-09-15 12:19:33 +01:00
Guillaume Lours c34a4df8fd
bump compose version to v2.11.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2022-09-14 21:04:42 +02:00
Sebastiaan van Stijn f7062f125c
Merge pull request #761 from thaJeztah/bump_golang_1.19.1
[master] makefile: update to go 1.19.1
2022-09-08 11:42:48 +02:00
Sebastiaan van Stijn 4e1fea30b6
makefile: update to go 1.19.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-08 11:24:56 +02:00
Sebastiaan van Stijn b22de2b3b6
Merge pull request #759 from thaJeztah/bump_golang_1.18.6
[master] makefile: update to go 1.18.6 to address CVE-2022-27664, CVE-2022-32190
2022-09-08 10:19:34 +02:00
Sebastiaan van Stijn fea60ea06c
makefile: update to go 1.18.6 to address CVE-2022-27664, CVE-2022-32190
From the mailing list:

We have just released Go versions 1.19.1 and 1.18.6, minor point releases.
These minor releases include 2 security fixes following the security policy:

- net/http: handle server errors after sending GOAWAY
  A closing HTTP/2 server connection could hang forever waiting for a clean
  shutdown that was preempted by a subsequent fatal error. This failure mode
  could be exploited to cause a denial of service.

  Thanks to Bahruz Jabiyev, Tommaso Innocenti, Anthony Gavazzi, Steven Sprecher,
  and Kaan Onarlioglu for reporting this.

  This is CVE-2022-27664 and Go issue https://go.dev/issue/54658.

- net/url: JoinPath does not strip relative path components in all circumstances
  JoinPath and URL.JoinPath would not remove `../` path components appended to a
  relative path. For example, `JoinPath("https://go.dev", "../go")` returned the
  URL `https://go.dev/../go`, despite the JoinPath documentation stating that
  `../` path elements are cleaned from the result.

  Thanks to q0jt for reporting this issue.

  This is CVE-2022-32190 and Go issue https://go.dev/issue/54385.

Release notes:

go1.18.6 (released 2022-09-06) includes security fixes to the net/http package,
as well as bug fixes to the compiler, the go command, the pprof command, the
runtime, and the crypto/tls, encoding/xml, and net packages. See the Go 1.18.6
milestone on the issue tracker for details;

https://github.com/golang/go/issues?q=milestone%3AGo1.18.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-06 23:24:51 +02:00
Sebastiaan van Stijn 87179a6ec3
Merge pull request #750 from thaJeztah/rpm_fix_buildx_vars
[master] buildx: fix missing git-commit in version
2022-08-27 00:25:06 +02:00
Sebastiaan van Stijn dac1ad385f
Merge pull request #748 from thaJeztah/update_compose_build
[master] compose: use updated makefile
2022-08-27 00:23:00 +02:00
Sebastiaan van Stijn b0621bde55
compose: use updated makefile
compose v2.10.1 comes with an updated Makefile, allowing us again
to use the makefile for building as part of the rpm/deb scripts.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-26 23:46:41 +02:00
Sebastiaan van Stijn ab55e16a2a
Merge pull request #754 from thaJeztah/compose_2.10.2
[master] update compose to v2.10.2
2022-08-26 23:44:19 +02:00
Sebastiaan van Stijn eb75664043
update compose to v2.10.2
release notes: https://github.com/docker/compose/releases/tag/v2.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-26 22:22:57 +02:00
Sebastiaan van Stijn ce1da79437
buildx: don't use bash, and enable "trimpath"
Don't use bash to compile buildx, re-format the build script to match
other parts, and enable trimpath.

We could also consider enabling `-s -w` to strip debugging symbols, as
we do for other binaries.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 20:58:19 +02:00
Sebastiaan van Stijn 60b1674fe4
deb: buildx: fix missing git-commit in version
The version output was missing the git-commit, because the deb build
tried to do a ``, but the source files used in the deb builds don't
include the git repository.

Before this:

    + docker buildx version
    github.com/docker/buildx v0.9.1

With this patch

    + docker buildx version
    github.com/docker/buildx v0.9.1 ed00243

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 20:58:17 +02:00
Sebastiaan van Stijn 42a208f8d3
rpm: buildx: fix missing %{_buildx_gitcommit}
The Makefile did not set a `%{_buildx_gitcommit}` variable, causing the version
output to show as:

    docker buildx version
    github.com/docker/buildx v0.9.1 %{_buildx_gitcommit}

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 20:58:14 +02:00
Sebastiaan van Stijn 209cac2038
Merge pull request #751 from thaJeztah/compose_2.10.1
[master] update compose to v2.10.1
2022-08-24 20:47:52 +02:00
Sebastiaan van Stijn 11d4042bbc
update compose to v2.10.1
release notes: https://github.com/docker/compose/releases/tag/v2.10.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 20:26:21 +02:00
Sebastiaan van Stijn 5683c6bdca
Merge pull request #749 from thaJeztah/update_verify
[master] verify: add minimal check for compose, buildx, scan
2022-08-24 03:23:09 +02:00
Sebastiaan van Stijn ce071a3315
verify: add minimal check for compose, buildx, scan
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-24 02:33:52 +02:00
Sebastiaan van Stijn 43635c4329
Merge pull request #745 from thaJeztah/less_goproxy_hacks
[master] Update GOPROXY to use default with fallback
2022-08-20 15:16:03 +02:00
Sebastiaan van Stijn 527508435e
Merge pull request #742 from thaJeztah/compose_2.10
[master] update compose to v2.10.0
2022-08-20 13:56:33 +02:00
Sebastiaan van Stijn 72d51db78e
Update GOPROXY to use default with fallback
Use the default proxy, to assist with LTS distros that use old git versions
but fallback on any error (instead of only on 404 and 410).

From the Go documentation; https://go.dev/ref/mod#goproxy-protocol

> List elements may be separated by commas (,) or pipes (|), which determine error
> fallback behavior. When a URL is followed by a comma, the go command falls back
> to later sources only after a 404 (Not Found) or 410 (Gone) response. When a URL
> is followed by a pipe, the go command falls back to later sources after any error,
> including non-HTTP errors such as timeouts. This error handling behavior lets a
> proxy act as a gatekeeper for unknown modules. For example, a proxy could respond
> with error 403 (Forbidden) for modules not on an approved list (see Private proxy
> serving private modules).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-20 13:53:23 +02:00
Sebastiaan van Stijn 89ba8eced3
update compose to v2.10.0
release notes: https://github.com/docker/compose/releases/tag/v2.10.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-20 13:39:00 +02:00
Sebastiaan van Stijn 8ab917b4d2
Merge pull request #744 from thaJeztah/fix_compose_build
deb, rpm: inline go build for compose
2022-08-20 13:38:21 +02:00
Sebastiaan van Stijn 1e3fdefd58
deb, rpm: inline go build for compose
The build.Makefile was removed from the compose repository, so copying
the code to build the plugin here.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-20 13:14:06 +02:00
Sebastiaan van Stijn 617e04fa9d
Merge pull request #738 from crazy-max/update-buildx
[master] update buildx to v0.9.1
2022-08-19 13:17:29 +02:00
CrazyMax 2b6acfeed1
update buildx to v0.9.1
release notes: https://github.com/docker/buildx/releases/tag/v0.9.1

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-18 21:04:19 +02:00
Sebastiaan van Stijn 178e5add65
Merge pull request #729 from thaJeztah/add_fedora_37
[master] rpm: add Fedora 37
2022-08-17 13:49:13 +02:00
Sebastiaan van Stijn 042e08aabc
rpm: add Fedora 37
not yet released, but pre-release images are available

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 09:27:06 +02:00
Sebastiaan van Stijn 08ea2e4b19
Merge pull request #733 from thaJeztah/verify_use_release_ver
[master] verify: rpm: force release-version for Fedora pre-releases
2022-08-17 09:25:27 +02:00
Sebastiaan van Stijn 517eba9932
verify: rpm: force release-version for Fedora pre-releases
On pre-releases of Fedora, the image may still have `rawhide` as distro-version,
which causes the verify script to fail (as download.docker.com does not have a
"rawhide" channel)

This patch forces the verify script to use the DIST_VERSION as specified in the
Dockerfile.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 09:01:51 +02:00
Sebastiaan van Stijn 595a8016fd
Merge pull request #732 from thaJeztah/no_upgrade_verify
[master] verify: rpm: don't perform dnf upgrade
2022-08-17 02:02:22 +02:00
Sebastiaan van Stijn 2dd12da2f0
Merge pull request #734 from thaJeztah/buildx_0.9
[master] update buildx to v0.9.0
2022-08-17 01:35:48 +02:00
Sebastiaan van Stijn e4ed207789
update buildx to v0.9.0
release notes: https://github.com/docker/buildx/releases/tag/v0.9.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-17 01:02:38 +02:00
Sebastiaan van Stijn 490dc34833
verify: rpm: don't perform dnf upgrade
This was added as part of 6dfaf9cc43, which came
from our internal repositories, but the original commits from there didn't have
context why an upgrade was performed.

In general, it's best practice to not perform a (dist-)upgrade inside the image,
and just depend on the image maintainers to have the image being up-to-date, so
removing this step.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-16 14:31:13 +02:00
Sebastiaan van Stijn 8b0101abaa
Merge pull request #725 from glours/bump-compose-version-2.9.0
[master] bump version of Compose to v2.9.0
2022-08-09 01:06:09 +02:00
Sebastiaan van Stijn 9cf8cacb7b
Merge pull request #727 from thaJeztah/update_distros
[master] remove Fedora 34 and Ubuntu 21.10 "Impish"
2022-08-04 11:16:51 +02:00
Sebastiaan van Stijn 9dd6313cce
Merge pull request #730 from thaJeztah/bump_go_1.18.5
makefile: update default golang version to 1.18.5
2022-08-04 11:09:54 +02:00
Sebastiaan van Stijn 884ee9f098
makefile: update default golang version to 1.18.5
Update Go runtime to 1.18.5 to address CVE-2022-32189.

Full diff: https://github.com/golang/go/compare/go1.18.4...go1.18.5

--------------------------------------------------------

From the security announcement:
https://groups.google.com/g/golang-announce/c/YqYYG87xB10

We have just released Go versions 1.18.5 and 1.17.13, minor point
releases.

These minor releases include 1 security fixes following the security
policy:

encoding/gob & math/big: decoding big.Float and big.Rat can panic

Decoding big.Float and big.Rat types can panic if the encoded message is
too short.

This is CVE-2022-32189 and Go issue https://go.dev/issue/53871.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.18.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 20:24:42 +02:00
Sebastiaan van Stijn d4248104dc
deb: remove Ubuntu 21.10 "impish" as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 15:00:33 +02:00
Sebastiaan van Stijn ec84712b88
rpm: remove Fedora 34 (EOL)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 15:00:26 +02:00
Sebastiaan van Stijn 5cb39bc462
deb: remove Ubuntu 21.04 "hirsute" from defaults
Commit 28a3c26090 removed the Dockerfile
and removed it from the Jenkinsfile, but forgot to remove it from the
Makefile's default list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-03 12:35:41 +02:00
Guillaume Lours 864fe8f20e
bump version of Compose to v2.9.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-08-01 18:27:00 +02:00
Sebastiaan van Stijn 870786d287
Merge pull request #721 from glours/bump-compose-version-2.7.0
[master] bump version of Compose to v2.7.0
2022-07-25 10:10:40 +02:00
Guillaume Lours 938a7c2d8a
bump version of Compose to v2.7.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-07-22 11:22:13 +02:00
Sebastiaan van Stijn 24bd91b555
Merge pull request #719 from thaJeztah/bump_go_1.18.4
[master] makefile: update default golang version to 1.18.4
2022-07-13 18:33:11 +02:00
Sebastiaan van Stijn 4b90366c7b
makefile: update default golang version to 1.18.4
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved

This update addresses:

CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.

Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4

From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE

We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:

- net/http: improper sanitization of Transfer-Encoding header

  The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
  a "chunked" encoding. This could potentially allow for request smuggling, but
  only if combined with an intermediate server that also improperly failed to
  reject the header as invalid.

  This is CVE-2022-1705 and https://go.dev/issue/53188.

- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
  containing a nil value for the X-Forwarded-For header, ReverseProxy would set
  the client IP as the value of the X-Forwarded-For header, contrary to its
  documentation. In the more usual case where a Director function set the
  X-Forwarded-For header value to nil, ReverseProxy would leave the header
  unmodified as expected.

  This is https://go.dev/issue/53423 and CVE-2022-32148.

  Thanks to Christian Mehlmauer for reporting this issue.

- compress/gzip: stack exhaustion in Reader.Read

  Calling Reader.Read on an archive containing a large number of concatenated
  0-length compressed files can cause a panic due to stack exhaustion.

  This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.

- encoding/xml: stack exhaustion in Unmarshal

  Calling Unmarshal on a XML document into a Go struct which has a nested field
  that uses the any field tag can cause a panic due to stack exhaustion.

  This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.

- encoding/xml: stack exhaustion in Decoder.Skip

  Calling Decoder.Skip when parsing a deeply nested XML document can cause a
  panic due to stack exhaustion. The Go Security team discovered this issue, and
  it was independently reported by Juho Nurminen of Mattermost.

  This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.

- encoding/gob: stack exhaustion in Decoder.Decode

  Calling Decoder.Decode on a message which contains deeply nested structures
  can cause a panic due to stack exhaustion.

  This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.

- path/filepath: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.

- io/fs: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.

- go/parser: stack exhaustion in all Parse* functions

  Calling any of the Parse functions on Go source code which contains deeply
  nested types or declarations can cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 12:01:54 +02:00
Sebastiaan van Stijn bea66a5f4e
Merge pull request #717 from thaJeztah/remove_version
[master] static: cross-win: remove version from bundles source
2022-07-04 18:06:11 +02:00
Sebastiaan van Stijn 89a633ab8f
static: cross-win: remove version from bundles source
Upstream moby no longer includes the version in the built binaries,
so removing it here.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-04 17:33:23 +02:00
Sebastiaan van Stijn a772dcde9f
Merge pull request #711 from glours/bump-compose-2.6.1
upgrade compose version to v2.6.1
2022-06-23 22:01:50 +02:00
Guillaume Lours bc231ae996
upgrade compose version to v2.6.1
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-06-23 17:21:14 +02:00
Sebastiaan van Stijn fd999a0e89
Merge pull request #707 from thaJeztah/update_golang_1.18.3
[master] makefile: update default go 1.18.3
2022-06-02 10:13:09 +02:00
Sebastiaan van Stijn 72e4e85bbe
makefile: update default go 1.18.3
go1.18.3 (released 2022-06-01) includes security fixes to the crypto/rand,
crypto/tls, os/exec, and path/filepath packages, as well as bug fixes to the
compiler, and the crypto/tls and text/template/parse packages. See the Go
1.18.3 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.18.3+label%3ACherryPickApproved

Hello gophers,

We have just released Go versions 1.18.3 and 1.17.11, minor point releases.

These minor releases include 4 security fixes following the security policy:

- crypto/rand: rand.Read hangs with extremely large buffers
  On Windows, rand.Read will hang indefinitely if passed a buffer larger than
  1 << 32 - 1 bytes.

  Thanks to Davis Goodin and Quim Muntal, working at Microsoft on the Go toolset,
  for reporting this issue.

  This is [CVE-2022-30634][CVE-2022-30634] and Go issue https://go.dev/issue/52561.
- crypto/tls: session tickets lack random ticket_age_add
  Session tickets generated by crypto/tls did not contain a randomly generated
  ticket_age_add. This allows an attacker that can observe TLS handshakes to
  correlate successive connections by comparing ticket ages during session
  resumption.

  Thanks to GitHub user nervuri for reporting this.

  This is [CVE-2022-30629][CVE-2022-30629] and Go issue https://go.dev/issue/52814.
- `os/exec`: empty `Cmd.Path` can result in running unintended binary on Windows

  If, on Windows, `Cmd.Run`, `cmd.Start`, `cmd.Output`, or `cmd.CombinedOutput`
  are executed when Cmd.Path is unset and, in the working directory, there are
  binaries named either "..com" or "..exe", they will be executed.

  Thanks to Chris Darroch, brian m. carlson, and Mikhail Shcherbakov for reporting
  this.

  This is [CVE-2022-30580][CVE-2022-30580] and Go issue https://go.dev/issue/52574.
- `path/filepath`: Clean(`.\c:`) returns `c:` on Windows

  On Windows, the `filepath.Clean` function could convert an invalid path to a
  valid, absolute path. For example, Clean(`.\c:`) returned `c:`.

  Thanks to Unrud for reporting this issue.

  This is [CVE-2022-29804][CVE-2022-29804] and Go issue https://go.dev/issue/52476.

[CVE-2022-30634]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30634
[CVE-2022-30629]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30629
[CVE-2022-30580]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-30580
[CVE-2022-29804]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29804

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-02 09:26:41 +02:00
Sebastiaan van Stijn 27c96a3578
Merge pull request #689 from thaJeztah/consistent_linking
[master] rpm: use same options for creating symlinks as in the deb builds
2022-06-01 11:43:15 +02:00
Sebastiaan van Stijn ef1a4310ed
Merge pull request #702 from glours/bump-compose-2.6.0
[master] bump version of Compose to v2.6.0
2022-05-31 15:26:21 +02:00
Guillaume Lours b00d0fc725
bump version of Compose to v2.6.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-05-30 18:31:21 +02:00
Sebastiaan van Stijn efa59d7742
Merge pull request #701 from thaJeztah/simplify_package_versions
Fix package version generation
2022-05-25 21:01:13 +02:00
Sebastiaan van Stijn f8299f2021
deb: fix version to allow for distro upgrades
The existing version format for our packages use `distro-codename` in the version.
Unfortunately, `codename` cannot be used to compare versions, which means that
when a user upgrades their distro to a new version, the package won't be updated
until a new release happens.

This patch changes the format of the version to include `VERSION_ID`, which is
numeric, and can be used in version comparison.

While we're making changes, this also adds an extra `pkgRevision` number in the
version, which can allow us to do a new build/release of a package in between
upstream releases. This version is not yet configurable (which can be changed
in future).

Resulting packages are now formatted as;

- name of the package (e.g., "docker-ce")
- version (e.g., "22.10.6~beta.0")
- "-0" (mostly "best practice", and allows updating for specific situations)
- distro (e.g., "ubuntu")
- VERSION_ID (e.g. "22.04" or "11") this must be "sortable" to make sure that
  packages are upgraded when upgrading to a newer distro version ("codename"
  cannot be used for this, as they're not sorted)
- pkgRevision (usually "0", see above)
- SUITE ("codename"), e.g. "jammy" or "bullseye". This is mostly for convenience,
  because some places refer to distro versions by codename, others by version.
  we prefix the codename with a tilde (~), which effectively excludes it from
  version comparison.

Note that while the `${EPOCH}${EPOCH_SEP}` is part of the version, it is not
included in the package's *filename*.

Examples:

    docker-ce_22.10.6~beta.0-0~debian.11.0~bullseye_amd64.deb
    docker-ce_22.10.6~beta.0-0~ubuntu.22.04.0~jammy_amd64.deb

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-25 20:42:51 +02:00
Sebastiaan van Stijn ba44734cf5
deb, rpm: generate versions without special numbers for pre-releases
The script had special handling for pre-releases, because at some point we
used `-tp` ("technical preview") as suffix for pre-releases instead of the
standard `-alpha`, `-beta`, `-rc`.

The problem arised because of that, was that comparing versions wouldn't work,
as these suffixes are compared in _alphabetical_ order (which meant that `tp`
would come "after" `beta` and `rc`). To work around this, some custom code
was added to insert a numeric version _before_ the `tp`, `beta`, and `rc`.

We no longer plan to use `-tp` for pre-releases, and instead to just use the
common `alpha[.number]`, `beta[.number]`, `rc[.number]` suffixes.

This patch removes the custom handling for pre-releases, to simplify the version
that's generated.

Before:

    ./rpm/gen-rpm-ver . 22.06.0-beta.0
    22.06.0 1.0.beta.0 3091da7 22.06.0-beta.0

    ./deb/gen-deb-ver . 22.06.0-beta.0
    22.06.0~1.0.beta.0 22.06.0-beta.0

After:

    ./rpm/gen-rpm-ver . 22.06.0-beta.0
    22.06.0~beta.0 1 0b5a1ae 22.06.0-beta.0

    ./deb/gen-deb-ver . 22.06.0-beta.0
    22.06.0~beta.0 22.06.0-beta.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-25 16:54:29 +02:00
Sebastiaan van Stijn 538e7f1a83
unify code for pseudo-versions (nightly), and fix for macOS
This unifies the logic/code for generating pseudo-versions for
nightly builds;

- Generate pseudo-version if the source repository has uncommitted changes
- Fix code to work on macOS
- Strip "v" prefix if the passed VERSION has one

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-25 16:50:29 +02:00
Sebastiaan van Stijn ab19b1cc13
Merge pull request #700 from thaJeztah/gen_version_fix
fix generating pre-release deb/rpm versions when using '.'
2022-05-24 13:55:08 +02:00
Sebastiaan van Stijn 005f613893
fix generating pre-release deb/rpm versions when using '.'
The script assumed that pre-release suffixes used the format `-tp<number>`,
`-beta<number>` or `-rc<number>`, however, it's more common (and standard
practice in SemVer) to delimit the `alpha/beta/rc` with a `.`, which allows
SemVer comparing to first sort by pre-release version (`alpha`, `beta`, `rc`),
then by the numeric suffix.

Altogether, we should consider removing this code; using `tp` as a pre-release
*before* `alpha` / `beta` is non-standard (pre-releases are named `alpha`, `beta`,
`rc`, so that they can be sorted alphabetically. Using `tp` violates that assumption,
and adds the complexity of having to add a numeric prefix to make it sort again.
Also see https://www.debian.org/doc/debian-policy/ch-controlfields.html#epochs-should-be-used-sparingly

Before:

    ./rpm/gen-rpm-ver . 22.06.0-beta0
    22.06.0 1.0.beta0 6e7db7f 22.06.0-beta0

    ./rpm/gen-rpm-ver . 22.06.0-beta.0
    22.06.0.beta.0 3 6e7db7f 22.06.0-beta.0

    ./deb/gen-deb-ver . 22.06.0-beta0
    22.06.0~1.0.beta0 22.06.0-beta0

    ./deb/gen-deb-ver . 22.06.0-beta.0
    22.06.0~beta.0~3 22.06.0-beta.0

After:

    ./rpm/gen-rpm-ver . 22.06.0-beta0
    22.06.0 1.0.beta0 3091da7 22.06.0-beta0

    ./rpm/gen-rpm-ver . 22.06.0-beta.0
    22.06.0 1.0.beta.0 3091da7 22.06.0-beta.0

    ./deb/gen-deb-ver . 22.06.0-beta0
    22.06.0~1.0.beta0 22.06.0-beta0

    ./deb/gen-deb-ver . 22.06.0-beta.0
    22.06.0~1.0.beta.0 22.06.0-beta.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-24 13:38:29 +02:00
Sebastiaan van Stijn 6e7db7f95a
Merge pull request #699 from thaJeztah/revert_debhelper_update
[master] Revert "Update "deb" packaging to use "dh_installsystemd""
2022-05-19 19:45:20 +02:00
Sebastiaan van Stijn cafc21c4f6
Revert "Update "deb" packaging to use "dh_installsystemd""
This reverts commit f9ac2f67a2.
as it unfortunately won't work with ubuntu 18.04, which doesn't
have debhelper-compat 12 (11 is the default, but that version
is discouraged).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 19:05:10 +02:00
Sebastiaan van Stijn 9e18d435e9
Merge pull request #697 from thaJeztah/integrate_verify
[master] Makefile: add "verify" target to test install of packages
2022-05-19 16:57:32 +02:00
Sebastiaan van Stijn 69781548e2
Makefile: add "verify" target to test install of packages
This verify step is primarily intended to verify that dependencies
are defined correctly, and available on the given distro.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 16:29:28 +02:00
Sebastiaan van Stijn a18ae7e6a5
Integrate release-packaging verify scripts
This integrates the verify scripts from our internal release-packaging
repository (ce-nightly branch), from commit a712afb008b56c7572e87b2bca81f1c50022ad2b

a712afb008

Strategy taken:

    # install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md)
    brew install git-filter-repo

    cd ~/projects

    # create a temporary clone of docker
    git clone https://github.com/docker/release-packaging.git release_packaging_verify
    cd release_packaging_verify
    git checkout ce-nightly

    # remove all code, except for verify and install-containerd-helpers
    git filter-repo  --path verify --path install-containerd-helpers --force

    # go to the target github.com/docker/docker-ce-packaging repository
    cd ~/projects/docker-ce-packaging

    # create a branch to work with
    git checkout -b integrate_verify

    # add the temporary repository as an upstream and make sure it's up-to-date
    git remote add release_packaging_verify ~/projects/release_packaging_verify
    git fetch release_packaging_verify

    # merge the upstream code
    git merge --allow-unrelated-histories --signoff -S release_packaging_verify/ce-nightly

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 16:07:26 +02:00
Sebastiaan van Stijn 80b286ba28
Merge pull request #683 from thaJeztah/min_containerd_version
[master] set minimum containerd.io version to v1.6.4
2022-05-19 12:09:55 +02:00
Sebastiaan van Stijn e356022360
rpm: use same options for creating symlinks as in the deb builds
Use the same options for creating the symlinks as for the deb packages, and
add the `-n` and `-f` options;

    -n, --no-dereference        treat LINK_NAME as a normal file if
                                it is a symbolic link to a directory
    -f, --force                 remove existing destination files

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 11:51:11 +02:00
Sebastiaan van Stijn 669f0a2094
set minimum containerd.io version to v1.6.4
This is for the upcoming 22 release, which will ship when we have
containerd.io 1.6 packages, so (as we did with previous releases),
set the minimum version to the current version.

Similar to 3f2b79d15d

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-19 11:48:30 +02:00
Sebastiaan van Stijn 081f3b196e
Merge pull request #694 from glours/bump-compose-2.5.1
bump version of Compose to v2.5.1
2022-05-17 18:43:58 +02:00
Guillaume Lours 1ce26e75e7
bump version of Compose to v2.5.1
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-05-17 18:06:31 +02:00
Sebastiaan van Stijn 24e75f9323
Merge pull request #686 from tianon/deb-dh_installsystemd
Update "deb" packaging to use "dh_installsystemd"
2022-05-17 13:38:01 +02:00
Tianon Gravi f9ac2f67a2 Update "deb" packaging to use "dh_installsystemd"
This also removes the now-obsolete upstart script and updates the "debhelper compat level" to 12 (which necessitates adding "override_dh_dwz" -- safe to remove once we can update to debhelper-compat 13+).

(See also https://lists.debian.org/debian-devel-announce/2020/02/msg00000.html)

Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2022-05-13 14:27:46 -07:00
Sebastiaan van Stijn 0beb78cd5d
Merge pull request #693 from thaJeztah/remove_old_buildtags
[master] remove obsolete "selinux, apparmor, seccomp" build-tags from DOCKER_BUILDTAGS
2022-05-13 18:11:54 +02:00
Sebastiaan van Stijn a18349fec1
Remove obsolete "seccomp" build-tag from DOCKER_BUILDTAGS
Starting with c9e19a2aa1,
the seccomp build-tag is no longer used, so can be removed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 12:25:40 +02:00
Sebastiaan van Stijn 78c9adb7f1
Remove obsolete "apparmor" build-tag from DOCKER_BUILDTAGS
The apparmor build-tag is no longer used;

    git grep '^// +build.*apparmor'
    # (no result)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 12:25:39 +02:00
Sebastiaan van Stijn 403e5cc10a
Remove obsolete "selinux" build-tag from DOCKER_BUILDTAGS
Since 1c0af18c6c,
moby no longer uses an selinux build-tag, so we can remove these.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 12:25:36 +02:00
Sebastiaan van Stijn b1bb9b91a1
Merge pull request #692 from thaJeztah/remove_runc_commit
[master] static: remove deprecated RUNC_COMMIT
2022-05-13 12:25:27 +02:00
Sebastiaan van Stijn 4ab4114605
static: remove deprecated RUNC_COMMIT
The Dockerfile for 20.10 and earlier used RUNC_COMMIT, later versions
use RUNC_VERSION. We can remove RUNC_COMMIT going forward.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 12:00:09 +02:00
Sebastiaan van Stijn 7037b699de
Merge pull request #691 from thaJeztah/runc_buildtags
[master] remove redundant RUNC_BUILDTAGS
2022-05-13 11:57:23 +02:00
Sebastiaan van Stijn 00df0c302a
Remove redundant RUNC_BUILDTAGS
The `apparmor` and `selinux` buildtags have been deprecated in runc, and are now
always enabled.

`seccomp` is enabled by default, but can be disabled by explicitly setting an
empty `BUILDTAGS` when building [1] however the Moby script used to build the
static `runc` binary already takes care of that [2]

[1]: 89c108b1be
[2]: 888c618c15/hack/dockerfile/install/runc.installer (L15)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 10:54:59 +02:00
Sebastiaan van Stijn a2427ba79b
Merge pull request #687 from thaJeztah/bump_golang_1.18.2
[master] makefile: update default go version to 1.18.2
2022-05-11 15:01:46 +02:00
Sebastiaan van Stijn bec606706c
makefile: update default go version to 1.18.2
go1.18.2 (released 2022-05-10) includes security fixes to the syscall package,
as well as bug fixes to the compiler, runtime, the go command, and the crypto/x509,
go/types, net/http/httptest, reflect, and sync/atomic packages. See the Go 1.18.2
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.18.2+label%3ACherryPickApproved

Full diff: http://github.com/golang/go/compare/go1.18.1...go1.18.2

Includes fixes for:

- CVE-2022-29526 (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29526);
  (description at https://go.dev/issue/52313).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-11 14:40:57 +02:00
Sebastiaan van Stijn abbac4ee3b
Merge pull request #634 from Romain-Geissler-1A/master
[master] Build for CentOS 9.
2022-05-05 13:40:09 +02:00
Sebastiaan van Stijn 1705ee09c3
Merge pull request #684 from thaJeztah/use_goproxy_by_default
[master] Makefile: enable GOPROXY to work around vanity URL being offline
2022-05-05 13:11:30 +02:00
Sebastiaan van Stijn 1dfe9a2bd4
Makefile: enable GOPROXY to work around vanity URL being offline
The https://honnef.co/go/tools domain looks to be offline, causing projects that
do not use vendoring to fail:

    go: downloading google.golang.org/protobuf v1.27.1
    go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369
    go: google.golang.org/grpc@v1.44.0 requires
    google.golang.org/genproto@v0.0.0-20200526211855-cb27e3aa2013 requires
    honnef.co/go/tools@v0.0.0-20190523083050-ea95bdfd59fc: unrecognized import path "honnef.co/go/tools": reading https://honnef.co/go/tools?go-get=1: 502 Bad Gateway
    make: *** [Makefile:71: manpages] Error 1

For now, let's use the GOPROXY (we should look at making this a build-arg probably)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-05 12:11:19 +02:00
Romain Geissler 0b469b4cc5 Build for CentOS 9.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-05-05 09:39:16 +00:00
Sebastiaan van Stijn 015bb449e4
Merge pull request #681 from glours/bump-compose-2.5.0
upgrade Docker Compose to v2.5.0
2022-04-29 17:24:18 +02:00
Guillaume Lours 0cbae9e88f
upgrade Docker Compose to v2.5.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-04-29 12:08:37 +02:00
Sebastiaan van Stijn a4bd67e76a
Merge pull request #679 from thaJeztah/bump_golang_1.18.1
[master] makefile: update default go version to 1.18.1
2022-04-21 16:45:49 +02:00
Sebastiaan van Stijn 15a891883f
makefile: update default go version to 1.18.1
go1.18.1 (released 2022-04-12) includes security fixes to the crypto/elliptic,
crypto/x509, and encoding/pem packages, as well as bug fixes to the compiler,
linker, runtime, the go command, vet, and the bytes, crypto/x509, and go/types
packages. See the Go 1.18.1 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.18.1+label%3ACherryPickApproved

Includes fixes for:

- CVE-2022-24675 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24675)
- CVE-2022-27536 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-27536)
- CVE-2022-28327 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-28327)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-19 12:36:25 +02:00
Sebastiaan van Stijn 5542b199ff
Merge pull request #677 from thaJeztah/fix_date_on_macos
static: make gen-static-ver work natively on macOS
2022-04-06 12:52:48 +02:00
Sebastiaan van Stijn 17a21b8cd1
static: make gen-static-ver work natively on macOS
macOS uses the BSD flavor of `date`, which does not support the `--date` option
to set a custom time. Previously, we were using an alpine container to provide a
GNU flavor of date, which was a bit of a hack.

This patch rewrites the script to work on macOS directly, without the need of
a container:

    ./static/gen-static-ver . v1.2.3-dev
    0.0.0-20220404154104-b815498

    docker run --rm -v $(pwd):/src -w /src golang bash -c './static/gen-static-ver . v1.2.3-dev'
    0.0.0-20220404154104-b815498

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-06 11:53:20 +02:00
Sebastiaan van Stijn b8154989dc
Merge pull request #675 from glours/bump-compose-2.4.1
[master] bump Compose to v2.4.1 version
2022-04-04 17:41:04 +02:00
Guillaume Lours e9adffca15
bump Compose to v2.4.1 version
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-04-04 15:13:26 +02:00
Sebastiaan van Stijn 85ceb34445
Merge pull request #672 from crazy-max/buildx_0.8.2
update buildx to v0.8.2
2022-04-04 10:41:33 +02:00
CrazyMax 2d8c488a9b
update buildx to v0.8.2
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-04 10:20:43 +02:00
Sebastiaan van Stijn 616d086fa1
Merge pull request #670 from glours/bump-compose-2-4-0
[master] bump Compose to v2.4.0 version
2022-04-01 11:07:16 +02:00
Guillaume Lours be95419245
bump Compose to v2.4.0 version
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-04-01 10:38:38 +02:00
Sebastiaan van Stijn 1da366c04a
Merge pull request #669 from thaJeztah/update_go_1.18.0
[master] makefile: update default go version to 1.18.0
2022-03-31 23:33:00 +02:00
Sebastiaan van Stijn 36d2e6e3c6
makefile: update default go version to 1.18.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-31 18:52:02 +02:00
Sebastiaan van Stijn 9036b8a26f
Merge pull request #666 from thaJeztah/fedora_36_makefile
[master] rpm: add fedora-36 to makefile
2022-03-31 13:23:57 +02:00
Sebastiaan van Stijn dbaee89418
rpm: add fedora-36 to makefile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-30 21:58:45 +02:00
Sebastiaan van Stijn b742b3a081
Merge pull request #662 from thaJeztah/remove_ubuntu_2104
[master] deb: remove Ubuntu 21.04 "Hirsute Hippo" as it's EOL
2022-03-30 20:13:06 +02:00
Sebastiaan van Stijn 28a3c26090
deb: remove Ubuntu 21.04 "Hirsute Hippo" as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 22:34:06 +02:00
Sebastiaan van Stijn f0188d6a7f
Merge pull request #654 from crazy-max/buildx-package
[master] add docker-buildx-plugin package (deb, rpm, static)
2022-03-27 17:40:37 +02:00
CrazyMax 4f4872477d
remove obsolete plugin installers
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 17:06:08 +02:00
CrazyMax 97b6ad89c8
add docker-buildx-plugin static package
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 17:06:08 +02:00
CrazyMax 37aa0a7cf4
add docker-buildx-plugin package (deb, rpm)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 17:06:08 +02:00
Sebastiaan van Stijn de92dc5018
Merge pull request #555 from thaJeztah/compose_cli_package_dependencies
[master]: deb/rpm define dependencies between docker-ce-cli and docker-compose-plugin
2022-03-27 16:47:04 +02:00
Sebastiaan van Stijn 9d28bec38e
Merge pull request #658 from thaJeztah/add_fedora_36
[master] rpm: add Fedora 36
2022-03-27 16:42:48 +02:00
Sebastiaan van Stijn 5d57e0bbdc
Merge pull request #660 from crazy-max/gha-init
ci: init github actions
2022-03-27 16:41:53 +02:00
CrazyMax ac9da15682
ci: init github actions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 15:01:13 +02:00
Sebastiaan van Stijn bb4bd31ab6
rpm: add docker-compose-plugin as "recommends" / "requires"
This defines the dependency between the docker cli and compose (as a plugin). RHEL8
and CentOS 8 (and up) support weak dependencies;

- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#support-for-weak-dependencies_new-features-in-rhel-8
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software#boolean-dependencies-syntax

But CentOS 7 and RHEL 7 do not yet support this, so for those, we use "Requires",
using the `%rhel` macro for detection, which also works on CentOS:

    rpm --eval '%{rhel}'
    7

Making the dependency _recommended_ will install it by default, but users _are_ able
to opt-out explicitly, using `--setopt=install_weak_deps=False`, for example, to
perform a light-weight installation that does not require all features of Docker.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 14:52:13 +02:00
Sebastiaan van Stijn a6baa8b026
deb: add docker-compose-plugin as "recommends"
This adds a "weak" dependency on the docker-compose-plugin, per the
recommendations in https://debian-handbook.info/browse/stable/sect.package-meta-information.html#id-1.8.6.7.10.10

The "recommends" dependency will be installed by default, but does allow users to opt-out
using `--no-install-recommends` to perform a lightweight installation for setups that only
need basic functionality of docker;

> (...) the “recommended” dependencies, the most important, considerably improve
> the functionality offered by the package but are not indispensable to its operation.
> (...) You should always install the “recommended” packages, unless you know exactly
> why you do not need them. This is now also the default for APT unless configured
> otherwise.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 14:48:18 +02:00
Sebastiaan van Stijn 8448ce452c
Merge pull request #656 from crazy-max/company-name
[master] makefile: add PACKAGER_NAME common variable
2022-03-27 14:47:18 +02:00
Sebastiaan van Stijn ef33edc77c
rpm: add Fedora 36
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 14:41:39 +02:00
Sebastiaan van Stijn c6374f724c
Merge pull request #657 from thaJeztah/fix_scan_dependency
[master] rpm: fix circular dependency between scan-cli-plugin and docker-ce-cli
2022-03-27 14:06:21 +02:00
CrazyMax 691adcd1fc
makefile: add PACKAGER_NAME common variable
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 13:43:26 +02:00
Sebastiaan van Stijn 51098f908e
rpm: fix circular dependency between scan-cli-plugin and docker-ce-cli
This fixes a problem when installing the packages from local files instead of
from the package repository. The current packages had a strong dependency set
in both directions (`docker-ce-cli` requires `docker-scan-plugin`, and vice-
versa). This caused a circular dependency, which could not be resolved when
trying to install the packages offline (from downloaded rpm files);

    yum install ./docker-scan-plugin-0.17.0-3.fc35.x86_64.rpm
    Last metadata expiration check: 1:09:40 ago on Tue Mar  8 08:30:47 2022.
    Error:
    Problem: conflicting requests
    - nothing provides docker-ce-cli needed by docker-scan-plugin-0.17.0-3.fc35.x86_64
      (try to add '--skip-broken' to skip uninstallable packages)

    yum install ./docker-ce-cli-20.10.13-3.fc35.x86_64.rpm
    Last metadata expiration check: 1:10:23 ago on Tue Mar  8 08:30:47 2022.
    Error:
    Problem: conflicting requests
    - nothing provides docker-scan-plugin(x86-64) needed by docker-ce-cli-1:20.10.13-3.fc35.x86_64
      (try to add '--skip-broken' to skip uninstallable packages)

This patch

- changes the `docker-scan-plugin` to `Enhances
- changes the `docker-ce-cli` package to mark the scan plugin as `Recommends`,
  with the exception of CentOS/RHEL 7, which do not yet support weak dependencies.
  For those, we continue to use `Requires`.

The `Recommends` dependency should be installed by default, but users can opt-out
by passing `--setopt=install_weak_deps=False` to `dnf`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-27 13:36:42 +02:00
Sebastiaan van Stijn 6168faba85
Merge pull request #652 from glours/bump-compose-2-3-4
[master] update Compose to v2.3.4
2022-03-27 00:10:56 +01:00
Sebastiaan van Stijn b537ea6134
Merge pull request #655 from thaJeztah/bump_go_1.17.8
[master] Makefile: update to go 1.17.8 as default
2022-03-26 22:14:23 +01:00
Sebastiaan van Stijn 5ebeeebe12
Makefile: update to go 1.17.8 as default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-26 21:27:23 +01:00
Guillaume Lours 7e3aa0e0b2
update Compose to v2.3.4
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-25 11:29:23 +01:00
Sebastiaan van Stijn 9de677ae3c
Merge pull request #650 from crazy-max/buildx_0.8.1
update buildx to v0.8.1
2022-03-21 15:14:39 +01:00
CrazyMax 4f63c5394c
update buildx to v0.8.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-21 14:47:52 +01:00
Sebastiaan van Stijn 07cf6612d8
Merge pull request #648 from thaJeztah/buildx_0.8
[master] update buildx to v0.8.0
2022-03-10 06:00:29 +01:00
Sebastiaan van Stijn e8f7e3a7ae
update buildx to v0.8.0
https://github.com/docker/buildx/releases/tag/v0.8.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-10 01:49:54 +01:00
Nicolas De loof cf93cdfe1f
Merge pull request #646 from glours/bump-compose-2-3-3 2022-03-09 15:33:03 +01:00
Guillaume Lours b9e03a20b5
update Compose to v2.3.3
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2022-03-09 15:11:10 +01:00
Sebastiaan van Stijn ad85fb0594
Merge pull request #644 from Romain-Geissler-1A/ubuntu22-master
Add Ubuntu 22.04.
2022-03-09 09:36:54 +01:00
Romain Geissler 7b18d53b23 Add Ubuntu 22.04.
Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-03-09 00:00:53 +00:00
Djordje Lukic 851150a42f
Merge pull request #642 from rumpl/compose-2.3.2
[master] Update compose to v2.3.2
2022-03-08 20:12:47 +01:00
Djordje Lukic 9d84296b40 Update compose to v2.3.2
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2022-03-08 18:57:26 +01:00
Sebastiaan van Stijn 71099ea2ce
Merge pull request #553 from thaJeztah/add_compose_cli_package
[master] add docker-compose-plugin package (deb, rpm)
2022-03-08 18:54:20 +01:00
Sebastiaan van Stijn a95571daa8
Merge pull request #640 from thaJeztah/fix_rpmlint_warnings
rpmlint: fix "E: description-line-too-long"
2022-03-08 17:27:40 +01:00
Sebastiaan van Stijn cab7b567fd
rpm: docker-compose-plugin: allow stand-alone installation
This removes the "require" docker-ce-cli, so that the package can be installed
stand-alone (withouth the docker cli itself installed).

Unlike "deb" packages, rpm package do not have "soft" requirement ("enhances",
"recommends"), so having a "requires" makes the docker-cli a hard requirement.

While in most situations, the plugin would be installed together with the docker
cli, the plugin _is_ able to run standalone:

    /usr/libexec/docker/cli-plugins/docker-compose up
    [+] Running 2/2
     ⠿ Network test_default  Created                         4.3s
     ⠿ Container test_web_1  Started                         2.1s
    Attaching to web_1
    web_1  | 10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
    web_1  | 10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
    web_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
    web_1  | /docker-entrypoint.sh: Configuration complete; ready for start up

This removes the "Requires" annotation from the package, to simplify the dependency
graph, and to allow installing the package separately (which could be for testing
purposes, or for a minimal install).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 12:32:56 +01:00
Sebastiaan van Stijn 276d806d08
rpm: add docker-compose-plugin package
Adds an rpm package for the docker-compose cli plugin

with this:

    rpm -i \
        ./docker-ce-cli-0.0.0.20210702143511.f782d13-0.el8.x86_64.rpm \
        ./docker-scan-plugin-0.8.0-0.el8.x86_64.rpm \
        ./docker-compose-plugin-2.3.1.3-0.el8.x86_64.rpm

    docker info --format '{{json .ClientInfo.Plugins}}' | jq .
    [
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.5.1-docker",
        "ShortDescription": "Build with BuildKit",
        "Name": "buildx",
        "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v2.3.1",
        "ShortDescription": "Docker Compose",
        "Name": "compose",
        "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.8.0",
        "ShortDescription": "Docker Scan",
        "Name": "scan",
        "Path": "/usr/libexec/docker/cli-plugins/docker-scan"
      }
    ]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 12:32:50 +01:00
Sebastiaan van Stijn d66f7a68c9
deb: add docker-compose-plugin package
Adds a deb package for the docker-compose cli plugin

with this:

    dpkg -i ./docker-ce-cli_0.0.0-20210629140245-4a6fe51-0~ubuntu-focal_amd64.deb
    dpkg -i ./docker-compose-plugin_2.3.1.3~ubuntu-focal_amd64.deb

    docker info --format '{{json .ClientInfo.Plugins}}' | jq .
    [
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.5.1-docker",
        "ShortDescription": "Build with BuildKit",
        "Name": "buildx",
        "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v2.3.1",
        "ShortDescription": "Docker Compose",
        "Name": "compose",
        "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
      }
    ]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 12:08:20 +01:00
Sebastiaan van Stijn e9a555e875
rpmlint: fix "E: description-line-too-long"
Fixes an error reported by rpmlint:

    docker-ce.x86_64: E: description-line-too-long they can run anywhere, from your laptop to the largest cloud compute instance and
    docker-ce-cli.x86_64: E: description-line-too-long they can run anywhere, from your laptop to the largest cloud compute instance and
    Your description lines must not exceed 80 characters. If a line is exceeding
    this number, cut it to fit in two lines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 10:28:47 +01:00
Sebastiaan van Stijn 1fb6e36261
Merge pull request #631 from thaJeztah/bump_go_1.16.15
[master] update to go 1.16.15 to address CVE-2022-24921
2022-03-07 19:00:29 +01:00
Sebastiaan van Stijn cee73ce876
Merge pull request #635 from thaJeztah/centos_module_fix
CentOS 7: use go-proxy to work around old git version
2022-03-07 18:35:45 +01:00
Sebastiaan van Stijn f99dd935c7
CentOS 7: use go-proxy to work around old git version
CentOS 7 comes with a very old (1.8) version of git, which is not compatible
with go modules. We previously applied this fix to individual build scripts
for rootless-extras and the scan-cli-plugin, but now that other bits are
failing as well, lets move this to the Dockerfile for this distro, so that
for other distros we can use "direct" and fetch from GitHub.

Without this, the build of docker/cli (master branch) failed with:

    + ./scripts/vendor init
    + go mod edit -modfile=vendor.mod -require=github.com/cpuguy83/go-md2man/v2@v2.0.1
    + cp man/tools.go .
    + ./scripts/vendor update
    + go mod tidy -modfile=vendor.mod
    go: github.com/theupdateframework/notary@v0.7.1-0.20210315103452-bf96a202a09a requires
        github.com/docker/go@v1.5.1-1.0.20160303222718-d30aec9fd63c: invalid pseudo-version: git fetch --unshallow -f origin in /go/pkg/mod/cache/vcs/48fbd2dfabec81f4c93170677bfc89087d4bec07a2d08f6ca5ce3d17962677ee: exit status 128:
        fatal: git fetch-pack: expected shallow list
    make: *** [manpages] Error 1
    error: Bad exit status from /var/tmp/rpm-tmp.aKncVr (%build)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-07 17:26:42 +01:00
Sebastiaan van Stijn 00a815f0b7
update to go 1.16.15 to address CVE-2022-24921
Addresses [CVE-2022-24921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24921)

go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and to the net package.
See the Go 1.16.15 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.15+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.16.14...go1.16.15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-04 16:49:20 +01:00
Sebastiaan van Stijn 69ac65fade
Merge pull request #627 from thaJeztah/centos_stream_fixups
[master] rpm/centos-8: some small fix-ups
2022-02-15 17:42:55 +01:00
Sebastiaan van Stijn 463a797fba
Merge pull request #629 from thaJeztah/bump_go1.16.14
[master] Update Go to 1.16.14
2022-02-15 17:42:19 +01:00
Sebastiaan van Stijn d18658d98a
Update Go to 1.16.14
Includes security fixes for crypto/elliptic (CVE-2022-23806), math/big (CVE-2022-23772),
and cmd/go (CVE-2022-23773).

go1.16.14 (released 2022-02-10) includes security fixes to the crypto/elliptic,
math/big packages and to the go command, as well as bug fixes to the compiler,
linker, runtime, the go command, and the debug/macho, debug/pe, net/http/httptest,
and testing packages. See the Go 1.16.14 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.14+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.16.13...go1.16.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 16:43:43 +01:00
Sebastiaan van Stijn 95bf13b24b
Jenkinsfile: use quay.io/centos/centos:stream8 as well
The `image` field in the Jenkinsfile is not really used in this repository
(other than to name the stage), but in our internal pipeline, the equivalent
is used for some validation steps (to be upstreamed to this repository).

Let's update the Jenkinsfile to match our internal one, and to make sure
we don't forget updating it when we upstream some of those validation steps.

Relates to 49ff911349

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 22:35:28 +01:00
Sebastiaan van Stijn a82904b79c
rpm/centos-8: adjust SUITE variable to keep it the same as before
This was a bit of an  oversight in 49ff9113494665d7aff0496a6aacf54a96bc344a;
when checking if the `$SUITE` variable was used elsewhere, I searched for
`$SUITE`, and not for `${SUITE}`. While it looks like the variable is not
used for any of the rpm-related build-scripts, it _is_ used in deb-related
scripts.

Let's change it back to the previous value; just in case it will be used
somewhere and causing side-effects.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 22:27:25 +01:00
Sebastiaan van Stijn 2f9858b3d7
Merge pull request #624 from thaJeztah/bump_scan
[master] upgrade docker scan to v0.17.0
2022-02-08 15:21:45 +01:00
Sebastiaan van Stijn 91f4f12516
Merge pull request #622 from thaJeztah/bump_golang_1.16.3
[master] Update Go to 1.16.13
2022-02-08 15:09:47 +01:00
Sebastiaan van Stijn 88113e618f
Merge pull request #600 from thaJeztah/remove_fedora_33
[master] Remove Fedora 33 as it's EOL
2022-02-08 14:16:30 +01:00
Sebastiaan van Stijn 247c6fd31e
Merge pull request #621 from thaJeztah/workaround_centos8_repos
[master] CentOS 8: switch to use centos 8 stream (quay.io/centos/centos:stream8)
2022-02-08 14:15:51 +01:00
Sebastiaan van Stijn 081ce5af4b
upgrade docker scan to v0.17.0
- Bump snyk 1.827.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 12:31:06 +01:00
Sebastiaan van Stijn f25408331c
Update Go to 1.16.13
go1.16.13 (released 2022-01-06) includes fixes to the compiler, linker, runtime,
and the net/http package. See the Go 1.16.13 milestone on our issue tracker for
details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.13+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 12:27:11 +01:00
Sebastiaan van Stijn 49ff911349
CentOS 8: switch to use centos 8 stream (quay.io/centos/centos:stream8)
CentOS 8 reached EOL on December 31, 2021 (https://www.centos.org/centos-linux-eol/)
Repositories have moved to vault.centos.org, causing builds to fail;

    Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

Update the Dockerfile to use quay.io/centos/centos:stream8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-08 11:40:22 +01:00
Sebastiaan van Stijn bdfbccbe26
Merge pull request #616 from thaJeztah/bump_scan
[master] upgrade docker scan to v0.16.0
2022-01-05 15:26:04 +01:00
Sebastiaan van Stijn cad31fa6c8
upgrade docker scan to v0.16.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-05 11:06:11 +01:00
Sebastiaan van Stijn 1926b98932
Merge pull request #614 from glours/bump-docker-scan-0-15-0
upgrade Docker Scan to v0.15.0
2021-12-23 11:46:12 +01:00
Guillaume Lours 0b78b5d3b2
upgrade Docker Scan to v0.15.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-23 10:44:14 +01:00
Sebastiaan van Stijn 190bf6fadd
Merge pull request #612 from glours/bump-docker-scan-0-14-0
upgrade Docker Scan to v0.14.0
2021-12-21 21:06:48 +01:00
Guillaume Lours cc6e6ffb5c
upgrade Docker Scan to v0.14.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-21 17:10:27 +01:00
Sebastiaan van Stijn dfcecdeb8f
Merge pull request #609 from glours/upgrade-docker-scan
bump version of Docker Scan to v0.12.0
2021-12-13 12:21:19 +01:00
Guillaume Lours c4814b47d4
bump version of Docker Scan to v0.12.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-13 11:56:37 +01:00
Sebastiaan van Stijn b5d99f3f19
Merge pull request #607 from thaJeztah/bump_go_1.16.12
[master] update Go to 1.16.12
2021-12-12 14:24:42 +01:00
Sebastiaan van Stijn cc2e34761f
Update Go to 1.16.12
go1.16.12 (released 2021-12-09) includes security fixes to the syscall and net/http
packages. See the Go 1.16.12 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.12+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-12 13:59:19 +01:00
Sebastiaan van Stijn d504d1468c
Merge pull request #605 from glours/update-docker-scan
update docker-scan to version 0.11.0
2021-12-11 17:42:54 +01:00
Guillaume Lours 15a8d1221e
update docker-scan to version 0.11.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-11 17:19:10 +01:00
Sebastiaan van Stijn 676373e0d8
Merge pull request #602 from crazy-max/update-buildx-0.7.1
update buildx to v0.7.1
2021-12-09 10:21:52 +01:00
Sebastiaan van Stijn 64959366c5
Merge pull request #603 from glours/update-docker-scan
update Docker Scan version to 0.10.0
2021-12-09 10:04:34 +01:00
Guillaume Lours 3e8c7f7b29
update Docker Scan version to 0.10.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-12-08 18:57:05 +01:00
CrazyMax d8c58afb50
update buildx to v0.7.1
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-26 16:58:09 +01:00
Sebastiaan van Stijn b26d507504
Remove Fedora 33 as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-22 15:03:47 +01:00
Sebastiaan van Stijn 66a4e43373
Merge pull request #598 from thaJeztah/update_buildx_0.7
[master] update buildx to v0.7.0
2021-11-16 12:44:12 +01:00
Sebastiaan van Stijn 756cf4ab3b
update buildx to v0.7.0
release notes: https://github.com/docker/buildx/releases/tag/v0.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-16 09:59:36 +01:00
Sebastiaan van Stijn 8bbb124d84
Merge pull request #594 from thaJeztah/split_stages
Jenkinsfile: run builds in parallel, and build all distro/arches
2021-10-25 11:39:42 +02:00
Sebastiaan van Stijn 54137603b8
Jenkinsfile: run builds in parallel, and build all distro/arches
This brings the Jenkinsfile slightly closer to the one in our internal
build pipeline (still some things to sort out).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-25 10:20:44 +02:00
Sebastiaan van Stijn da818ea1ff
Makefile: add "distro-xxx" aliases for rpm and deb
This allows easier building without having to specify if an "rpm" or "deb"
needs to be built.

Before this patch:

    make -C rpm centos-8
    make -C deb ubuntu-focal

With this patch applied:

    make centos-8
    make ubuntu-focal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-22 17:57:41 +02:00
Frédéric Dalleau 94f2818458
Merge pull request #592 from thaJeztah/fedora_35
[master] rpm: add Fedora 35
2021-10-22 17:55:30 +02:00
Sebastiaan van Stijn e9f5693210
rpm: add Fedora 35
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-22 15:44:37 +02:00
Sebastiaan van Stijn dda0c67c7c
Merge pull request #585 from AkihiroSuda/impish
[master] Add Ubuntu 21.10 "Impish Indri"
2021-10-22 15:00:02 +02:00
Sebastiaan van Stijn 3a9994ed48
Merge pull request #588 from thaJeztah/disable_zstd_compression
[master] deb: force dpkg-build to use xz compression instead of zstd
2021-10-21 23:27:53 +02:00
Sebastiaan van Stijn 7b5f45e23e
Merge pull request #590 from thaJeztah/update_scan_0.9
Update scan-cli-plugin to v0.9.0
2021-10-21 22:24:19 +02:00
Sebastiaan van Stijn 0314fcbb25
Update scan-cli-plugin to v0.9.0
release notes: https://github.com/docker/scan-cli-plugin/releases/tag/v0.9.0

full diff: https://github.com/docker/scan-cli-plugin/compare/v0.8.0...v0.9.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-21 21:24:53 +02:00
Sebastiaan van Stijn 0f4c193dfa
deb: force dpkg-build to use xz compression instead of zstd
Ubuntu 21.10 switched the default compression for .deb packages to use zstd.
While this change may bring some performance improvement, it is non-standard,
and not all deb-related tooling currently support zstd compression. One of those
tools, dpkg-sig, has not (yet) been modified to support zstd compression; we use
this tool to sign our packages (and verify that packages are signed), which
currently fails if packages use zstd compression;

    dpkg-sig --verify ./containerd.io_1.4.11-1_amd64.deb
    Processing ./containerd.io_1.4.11-1_amd64.deb...
    BADSIG _gpgbuilder

It should be noted that signing individual packages is *optional* [1], and that
dpkg-sig has not received updates since 2006 [2] (possibly better replaced with
debsigs / debsig-verify), but changing would be a potential breaking change, as
these tools are not interchangeable [3]

[1]: https://www.debian.org/doc/manuals/securing-debian-manual/deb-pack-sign.en.html
[2]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995113
[3]: https://raphaelhertzog.com/2010/09/17/how-to-create-debian-packages-with-alternative-compression-methods/

This patch hard-codes the compression to use in the debian rules, instead of using
the default that's used by the distro.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-20 00:08:11 +02:00
Sebastiaan van Stijn 3fdfa7d7d9
Merge pull request #586 from thaJeztah/bump_go_1.16.9
[master] update Go to 1.16.9
2021-10-18 17:09:35 +02:00
Sebastiaan van Stijn 8121e95996
Update Go to 1.16.9
go1.16.9 (released 2021-10-07) includes a security fix to the linker and misc/wasm
directory, as well as bug fixes to the runtime and to the text/template package.
See the Go 1.16.9 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.9+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-18 16:33:16 +02:00
Akihiro Suda a0b4eed1f7
Add Ubuntu 21.10 "Impish Indri"
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-10-15 15:28:38 +09:00
Sebastiaan van Stijn 3533c14a0f
Merge pull request #583 from thaJeztah/containerd_runc_versions
[master] static: add option to specify containerd and runc version
2021-10-04 12:17:14 +02:00
Sebastiaan van Stijn f0302b8ab4
static: add option to specify containerd and runc version
This allows passing `CONTAINERD_VERSION` and `RUNC_VERSION` make vars
to override the default version in the upstream repository's Dockerfile.

With this, it's easier to make the static packages match the latest
released `containerd.io` deb/rpm (which are used by the .deb and .rpm
docker-ce packages), without having to modify the upstream moby repository.

Currently, this uses the DOCKER_BUILD_OPTS make variable, which is available
in the moby Makefile, but work is in progress to add `CONTAINERD_VERSION`
and `RUNC_VERSION` make variables in the upstream repository. Once those
changes are merged, we can update the makefile in this repository accordingly.

With this patch:

If `RUNC_VERSION` and `CONTAINERD_VERSION` are not passed, the defaults are used:

    $ make \
        DOCKER_BUILD_PKGS=static-linux \
        REF=v20.10.8 \
        VERSION=v20.10.8 \
        static

    $ docker run --rm -v $(pwd)/static/build/linux/docker/:/docker alpine sh -c '/docker/containerd --version && /docker/runc --version'
    containerd github.com/containerd/containerd v1.4.9 e25210fe30a0a703442421b0f60afac609f950a3
    runc version 1.0.1
    commit: v1.0.1-0-g4144b638
    spec: 1.0.2-dev
    go: go1.16.8
    libseccomp: 2.4.4

Passing the `RUNC_VERSION` and `CONTAINERD_VERSION` vars overrides the version
of containerd and runc:

    $ make \
        DOCKER_BUILD_PKGS=static-linux \
        REF=v20.10.8 \
        VERSION=v20.10.8 \
        RUNC_VERSION=v1.0.2 \
        CONTAINERD_VERSION=v1.4.10 \
        static

    $ docker run --rm -v $(pwd)/static/build/linux/docker/:/docker alpine sh -c '/docker/containerd --version && /docker/runc --version'
    containerd github.com/containerd/containerd v1.4.10 8848fdb7c4ae3815afcc990a8a99d663dda1b590
    runc version 1.0.2
    commit: v1.0.2-0-g52b36a2d
    spec: 1.0.2-dev
    go: go1.16.8
    libseccomp: 2.4.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-04 09:58:02 +02:00
Sebastiaan van Stijn bdb0c69459
Merge pull request #573 from AkihiroSuda/remove-groovy
[master] Remove Ubuntu 20.10 "Groovy" (EOL: 2021-07-22)
2021-09-16 16:43:23 +02:00
Sebastiaan van Stijn 7db3f6df84
Merge pull request #580 from thaJeztah/bump_go_1.16.8
[master] Update Go to 1.16.8
2021-09-15 15:38:15 +02:00
Sebastiaan van Stijn 29440af6ff
Merge pull request #579 from thaJeztah/bump_buildx_0.6.3
[master] update buildx to v0.6.3
2021-09-15 15:37:56 +02:00
Sebastiaan van Stijn da31b694ae
update buildx to v0.6.3
release notes: https://github.com/docker/buildx/releases/tag/v0.6.3

- Fix buildkit state volume location for Windows clients

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-15 14:30:55 +02:00
Sebastiaan van Stijn 7a2acbf85c
Update Go to 1.16.8
This includes additional fixes for CVE-2021-39293.

go1.16.8 (released 2021-09-09) includes a security fix to the archive/zip package,
as well as bug fixes to the archive/zip, go/internal/gccgoimporter, html/template,
net/http, and runtime/pprof packages. See the Go 1.16.8 milestone on the issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.8+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-15 14:27:54 +02:00
Sebastiaan van Stijn e90f19ab11
Merge pull request #578 from thaJeztah/fix_proxy_target
[master] static: windows: fix "docker-proxy.exe" being copied as "dockerd.exe"
2021-09-09 13:01:16 +02:00
Sebastiaan van Stijn fc5379fee8
static: windows: fix "docker-proxy.exe" being copied as "dockerd.exe"
This was introduced in 09541b553c, which fixed the
source-location of the docker-proxy binary, but accidentally used "dockerd.exe"
as target.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-09 10:16:56 +02:00
Sebastiaan van Stijn a256741f51
Merge pull request #577 from thaJeztah/fix_rootlesskit_centos
Add workaround for CentOS 7 not working without GOPROXY
2021-09-06 10:59:26 +02:00
Sebastiaan van Stijn 9c363de294
Add workaround for CentOS 7 not working without GOPROXY
This fix was previously included in the rootlesskit install script
in moby, but should've been addressed by Go 1.14 and up. Unfortunately,
this does not appear the case, and go modules without proxy is still
broken on older versions of git, such as the version of git used by
CentOS 7.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-09-06 09:36:41 +02:00
Sebastiaan van Stijn 950efb4c0b
Merge pull request #571 from AkihiroSuda/dbus-user
Require `dbus-user-session` for rootless
2021-09-02 10:21:32 +02:00
Akihiro Suda 6a25608bd1
Remove Ubuntu 20.10 "Groovy" (EOL: 2021-07-22)
Ubuntu 20.10 "Groovy Gorilla" reached EOL on 2021-07-22: https://wiki.ubuntu.com/Releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-27 18:03:05 +09:00
Akihiro Suda 245b422627
Require `dbus-user-session` for rootless
On Debian, `dbus-user-session` is not installed by default.
The lack of `dbus-user-session` results in a cryptic error on rootless+cgroup2+systemd:
`read unix @->/run/systemd/private: read: connection reset by peer: unknown.`

ref: moby/moby issue 42793

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-27 15:33:23 +09:00
Sebastiaan van Stijn 502a32e5a1
Merge pull request #569 from thaJeztah/bump_buildx_0.6.2
[master] update buildx to v0.6.2
2021-08-25 20:55:02 +02:00
Sebastiaan van Stijn 9aef5e8552
update buildx to v0.6.2
release notes: https://github.com/docker/buildx/releases/tag/v0.6.2

- Fix connection error showing up in some SSH configurations

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-25 19:42:22 +02:00
Sebastiaan van Stijn 9fa301f37b
Merge pull request #566 from thaJeztah/bump_go_1.16.7
Update Go to 1.16.7
2021-08-11 09:49:20 +02:00
Sebastiaan van Stijn 8931a397cc
Update Go to 1.16.7
go1.16.7 (released 2021-08-05) includes a security fix to the net/http/httputil
package, as well as bug fixes to the compiler, the linker, the runtime, the go
command, and the net/http package. See the Go 1.16.7 milestone on the issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.7+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-07 18:27:57 +02:00
Sebastiaan van Stijn 87680009a5
Merge pull request #565 from crazy-max/buildx-update
[master] update buildx to v0.6.1
2021-07-30 20:53:49 +02:00
CrazyMax 2a17e90149
update buildx to v0.6.1
release notes: https://github.com/docker/buildx/releases/tag/v0.6.1

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-30 20:13:28 +02:00
Sebastiaan van Stijn 275427031b
Merge pull request #563 from thaJeztah/bump_go_1.16.6
[master] bump go 1.16.6, and remove Go version override from static builds
2021-07-29 13:04:27 +02:00
Sebastiaan van Stijn 9308b2f53b
Bump go 1.16.6 (addresses CVE-2021-34558)
This addresses CVE-2021-34558: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34558

go1.16.6 (released 2021-07-12) includes a security fix to the crypto/tls package,
as well as bug fixes to the compiler, and the net and net/http packages. See the
Go 1.16.6 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-28 22:12:29 +02:00
Sebastiaan van Stijn 8141ee7d60
static: use same Go version as other builds
Use the version that's defined/set in common.mk

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-28 22:11:15 +02:00
Sebastiaan van Stijn b1b4e5af74
Revert "plugins: update golang to 1.16.3 to build buildx on darwin/arm64"
This reverts commit 60e28c914d.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-28 22:09:22 +02:00
Sebastiaan van Stijn 093961dcfb
Merge pull request #561 from thaJeztah/bump_buildx_0.6
[master] update buildx to v0.6.0
2021-07-28 14:56:34 +02:00
Sebastiaan van Stijn 7593a3f5fc
update buildx to v0.6.0
release notes: https://github.com/docker/buildx/releases/tag/v0.6.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-28 13:30:25 +02:00
Sebastiaan van Stijn 5b9172b6b7
plugins/buildx: enable go modules to fix invalid //import comment
The buildkit vendor in buildx contains an incorrect `//import` comment, which
causes compile to fail if go modules are disabled.

Without `GO111MODULE` set (but with `-mod=vendor`:

    echo $GO111MODULE

    export PKG=github.com/docker/buildx
    export LDFLAGS="-X ${PKG}/version.Version=$(git describe --match 'v[0-9]*' --always --tags) -X ${PKG}/version.Revision=$(git rev-parse HEAD) -X ${PKG}/version.Package=${PKG}"
    GOFLAGS=-mod=vendor go build -o bin/docker-buildx -ldflags "${LDFLAGS}" ./cmd/buildx
    bin/docker-buildx version
    github.com/docker/buildx v0.6.0 d9ee3b134cbc2d09513fa7fee4176a3919e05887

When setting `GO111MODULE=off`, it fails on the incorrect import path in the
vendored file (looks like GO111MODULE=on ignores import-path comments?):

    export GO111MODULE=off
    root@5a55ec1c1eed:/go/src/github.com/docker/buildx# GOFLAGS=-mod=vendor go build -o bin/docker-buildx -ldflags "${LDFLAGS}" ./cmd/buildx
    vendor/github.com/moby/buildkit/client/client.go:20:2: code in directory /go/src/github.com/docker/buildx/vendor/github.com/moby/buildkit/util/tracing/otlptracegrpc expects import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
    vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/connection/connection.go:33:2: found import comments "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig" (options.go) and "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig" (optiontypes.go) in /go/src/github.com/docker/buildx/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-28 13:30:17 +02:00
Frédéric Dalleau d60064bee0
Merge pull request #527 from thaJeztah/remove_redundant_systemd_check
deb: remove redundant "--with systemd" option
2021-07-09 15:17:00 +02:00
Sebastiaan van Stijn da87f41587
deb: remove redundant "--with systemd" option
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-09 13:49:18 +02:00
Frédéric Dalleau e5954154b0
Merge pull request #557 from thaJeztah/xenial_eol
[master] remove Ubuntu 16.04 Xenial, Fedora 32 (both EOL)
2021-07-09 12:41:14 +02:00
Sebastiaan van Stijn e04189ece7
rpm: remove Fedora 32 (EOL: 18 May 2021)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-06 13:51:49 +02:00
Sebastiaan van Stijn 2ab0763685
deb: remove Ubuntu 16.04 "xenial" (End of support: April, 2021)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-06 13:50:37 +02:00
Frédéric Dalleau bf33229b18
Merge pull request #556 from thaJeztah/fix_version_check
Fix binary version checks masking failure exit code
2021-07-05 10:53:25 +02:00
Sebastiaan van Stijn 5d9ad8ccf9
Fix binary version checks masking failure exit code
Commit 928a8f2b57 added a check for binary
version set through build-time variables, but I messed up, and forgot to
add a non-zero exit code. As a result the exit code was the exit code of
the "echo", which would always be successful.

This also revealed a missing check for "target architecture": the scan
cli plugin is only built on x86, so the version check should not be
performed on other architectures.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-03 18:09:44 +02:00
Frédéric Dalleau 4cd3a7eca2
Merge pull request #554 from thaJeztah/fix_docker_proxy_build
Fix build-script for docker-proxy (after libnetwork integration) and update to Go 1.16.5
2021-07-02 16:27:08 +02:00
Sebastiaan van Stijn 09541b553c
static: fix location of Windows binary
Not sure why, but looks like the path used `<arch>-daemon` (instead of just `<arch>`).
However, it's not consistent either, because `containerutility.exe` is in `<arch>`?

When running:

    make REF=master checkout
    make REF=master DOCKER_BUILD_PKGS=cross-win static

The build failed:

    mkdir -p build/win/amd64/docker
    cp /Users/sebastiaan/go/src/github.com/docker/docker-ce-packaging/src/github.com/docker/cli/build/docker-windows-amd64.exe build/win/amd64/docker/docker.exe
    cp /Users/sebastiaan/go/src/github.com/docker/docker-ce-packaging/src/github.com/docker/docker/bundles/cross/windows/amd64/dockerd-0.0.0-20210629140245-4a6fe51.exe build/win/amd64/docker/dockerd.exe
    cp: /Users/sebastiaan/go/src/github.com/docker/docker-ce-packaging/src/github.com/docker/docker/bundles/cross/windows/amd64/dockerd-0.0.0-20210629140245-4a6fe51.exe: No such file or directory
    make[1]: *** [cross-win] Error 1
    make: *** [static] Error 2

This is what's in bundles:

    tree /Users/sebastiaan/go/src/github.com/docker/docker-ce-packaging/src/github.com/docker/docker/bundles/
    /Users/sebastiaan/go/src/github.com/docker/docker-ce-packaging/src/github.com/docker/docker/bundles/
    └── cross
        └── windows
            ├── amd64
            │   └── containerutility.exe
            └── amd64-daemon
                ├── docker-proxy-0.0.0-20210629140245-4a6fe51.exe
                ├── docker-proxy-0.0.0-20210629140245-4a6fe51.exe.md5
                ├── docker-proxy-0.0.0-20210629140245-4a6fe51.exe.sha256
                ├── docker-proxy.exe -> docker-proxy-0.0.0-20210629140245-4a6fe51.exe
                ├── dockerd-0.0.0-20210629140245-4a6fe51.exe
                ├── dockerd-0.0.0-20210629140245-4a6fe51.exe.md5
                ├── dockerd-0.0.0-20210629140245-4a6fe51.exe.sha256
                └── dockerd.exe -> dockerd-0.0.0-20210629140245-4a6fe51.exe

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-30 13:16:51 +02:00
Sebastiaan van Stijn 78242140d7
Add libarchive build-dep to fix missing archive_write_add_filter_zstd
Trying to fix

    + echo 'Install tini version de40ad007797e0dcd8b7126f27bb87401d224240'
    + git clone https://github.com/krallin/tini.git /go/tini
    Install tini version de40ad007797e0dcd8b7126f27bb87401d224240
    Cloning into '/go/tini'...
    + cd /go/tini
    + git checkout -q de40ad007797e0dcd8b7126f27bb87401d224240
    + cmake .
    cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd
    error: Bad exit status from /var/tmp/rpm-tmp.Dl5CDf (%build)

According to https://bugs.centos.org/view.php?id=18212, upgrading to libarchive-3.3.3-1.el8.x86_64
should resolve the problem.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-30 09:59:54 +02:00
Frédéric Dalleau dc6d0c51e0
Merge pull request #551 from thaJeztah/add_version_checks
Add checks for binary versions set through build-time variables
2021-06-30 09:25:06 +02:00
Sebastiaan van Stijn 3d0e7c4e99
update default go version to 1.16.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-30 00:57:29 +02:00
Sebastiaan van Stijn 4eec558e65
Fix build-script for docker-proxy (after libnetwork integration)
libnetwork has been integrated in the docker/docker (moby) repository,
and now is compiled as part of hack/make.sh dynbinary.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-30 00:33:27 +02:00
Sebastiaan van Stijn 928a8f2b57
Add checks for binary versions set through build-time variables
Make sure that these versions are set, and match the expected versions

DEB:

       debian/rules override_dh_auto_test
    make[1]: Entering directory '/root/build-deb'
    ver="$(engine/bundles/dynbinary-daemon/dockerd --version)"; \
        test "$ver" = "Docker version 0.0.0-20210531142756-1c174ced, build 7c6a9484" && echo "PASS: daemon version OK" || echo "FAIL: daemon version ($ver) did not match"
    PASS: daemon version OK
    ver="$(cli/build/docker --version)"; \
        test "$ver" = "Docker version 0.0.0-20210531142756-1c174ced, build 1c174ced" && echo "PASS: cli version OK" || echo "FAIL: cli version ($ver) did not match"
    PASS: cli version OK
    # FIXME: --version currently doesn't work as it makes a connection to the daemon, so using the plugin metadata instead
    ver="$(/usr/libexec/docker/cli-plugins/docker-scan docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \
        test "$ver" = "v0.8.0" && echo "PASS: docker-scan version OK" || echo "FAIL: docker-scan version ($ver) did not match"
    PASS: docker-scan version OK

RPM:

    Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.SIDNvr
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd src
    ++ engine/bundles/dynbinary-daemon/dockerd --version
    + ver='Docker version 0.0.0-20210531142756-1c174ced, build 7c6a9484'
    + test 'Docker version 0.0.0-20210531142756-1c174ced, build 7c6a9484' = 'Docker version 0.0.0-20210531142756-1c174ced, build 7c6a9484'
    + echo 'PASS: daemon version OK'
    + exit 0
    PASS: daemon version OK
    ...

    Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.jKzBxw
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd src
    ++ cli/build/docker --version
    PASS: cli version OK
    + ver='Docker version 0.0.0-20210531142756-1c174ced, build 1c174ced'
    + test 'Docker version 0.0.0-20210531142756-1c174ced, build 1c174ced' = 'Docker version 0.0.0-20210531142756-1c174ced, build 1c174ced'
    + echo 'PASS: cli version OK'
    + exit 0
    ...
    Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.5KN9vp
    + umask 022
    + cd /root/rpmbuild/BUILD
    + cd src
    ++ /root/rpmbuild/BUILDROOT/docker-scan-plugin-0.8.0-0.el8.x86_64/usr/libexec/docker/cli-plugins/docker-scan docker-cli-plugin-metadata
    ++ awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }'
    PASS: docker-scan version OK
    + ver=v0.8.0
    + test v0.8.0 = v0.8.0
    + echo 'PASS: docker-scan version OK'
    + exit 0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-02 14:52:17 +02:00
Sebastiaan van Stijn 409ab6ccdc
Merge pull request #548 from StefanScherer/remove-docker-app
Remove docker-app plugin
2021-06-02 13:52:51 +02:00
Frédéric Dalleau 3f7664e038
Merge pull request #549 from thaJeztah/fix_scan_cli_version
rpm: scan-cli-plugin: fix build-time "version" and "commit" variables
2021-06-02 11:19:35 +02:00
Sebastiaan van Stijn 20c5feedcb
rpm: scan-cli-plugin: fix build-time "version" and "commit" variables
When building rpm (and deb) packages, binaries are built from a source tarball.
Source tarballs will only include the raw source code, but do not include the
git repository; c4c2d89b4e/rpm/Makefile (L110-L116)

    tar -C / -c -z -f /v/scan-cli-plugin.tgz --exclude .git scan-cli-plugin

Because of this, the makefile used to build the scan-cli-plugin binaries will
not be able to determine the "commit" (and version) to set as build-time variable
to include in the `--version` output; 3eaac3e884/builder.Makefile (L5-L19)
resulting in both `version` and `git commit` to be empty in the version output:

    docker scan --version
    Version:
    Git commit:
    Provider:   Snyk (1.563.0 (standalone))

This patch updates the RPM spec to add variables for passing this information,
and collects the commit and version from the host to pass it to the build-
container in which the RPMs are built, similar to how  they're passed for the
equivalent "deb" build-containers (which use env-vars for this);
c4c2d89b4e/deb/Makefile (L36-L37)

Before:

    docker scan --version
    Version:
    Git commit:
    Provider:   Snyk (1.563.0 (standalone))

    docker info
    Client:
     Context:    default
     Debug Mode: false
     Plugins:
      app: Docker App (Docker Inc., v0.9.1-beta3)
      buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
      scan: Docker Scan (Docker Inc.)
    ...

After:

    docker scan --version
    Version:    v0.8.0
    Git commit: 35651ca
    Provider:   Snyk (1.563.0 (standalone))

    docker info

    Client:
     Context:    default
     Debug Mode: false
     Plugins:
      app: Docker App (Docker Inc., v0.9.1-beta3)
      buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
      scan: Docker Scan (Docker Inc., v0.8.0)
    ...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-02 09:31:36 +02:00
Sebastiaan van Stijn 12187a5f9d verify: fail if we try to use debian "sid" as distro name
We should never build packages for "sid", which is a codename for "unstable",
and instead use the codename that it's currently referring to (codename of
next stable release).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 11:24:10 +02:00
Sebastiaan van Stijn 5f157ebdd9 verify: fix hard-coded distro name for "sid" (Debian unstable)
Debian "sid" is not an actual distro version. Sid represents the "unstable"
channel ("next stable in-progress"). Currently, it is equivalent to "bullseye",
but once "bullseye" is stable, it becomes "bookworm", "trixy", etc (see the
list of Debian releases at https://wiki.debian.org/DebianReleases).

We should fix this hard-coded override, and instead try to get this name from
information in /var/lib/apt/lists/.

Also see https://github.com/docker/containerd-packaging/pull/219 for details.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-01 11:24:08 +02:00
Stefan Scherer b4960ab373
Remove docker-app plugin
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2021-05-25 10:42:58 +02:00
Sebastiaan van Stijn f00ec07824
Merge pull request #483 from thaJeztah/use_ubuntu_2004
[master] Jenkinsfile: use Ubuntu 20.04 nodes for building
2021-05-21 12:15:55 +02:00
Frédéric Dalleau a786f93b02
Merge pull request #547 from thaJeztah/use_upstream_systemd
Use systemd unit files from upstream repository
2021-05-21 11:57:56 +02:00
Sebastiaan van Stijn 5aed4980a4
Merge pull request #546 from thaJeztah/update_readme
update README to clarify purpose of this repository
2021-05-20 17:27:40 +02:00
Sebastiaan van Stijn c4c2d89b4e
Use systemd unit files from upstream repository
The packaging repository was maintaining its own version of the systemd units.
These files were originally based on the units in the upstream docker / moby
repository, but diverged.

PR https://github.com/moby/moby/pull/42373 merged back the units from this
repository to upstream, so we can now consume those files instead of the
ones that were maintained in this repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-20 17:18:39 +02:00
Sebastiaan van Stijn 12daef812a
update README to clarify purpose of this repository
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-19 13:51:43 +02:00
Sebastiaan van Stijn 6857538d99
Merge pull request #544 from glours/udpate-docker-scan-0.8.0
Upgrade Docker Scan plugin to v0.8.0
2021-04-28 12:16:17 +02:00
Guillaume Lours a115ad60e9 Upgrade Docker Scan plugin to v0.8.0
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-04-28 11:20:18 +02:00
Tibor Vass b392198eaf
Merge pull request #540 from tiborvass/darwin_arm64
mac: build arm64 binaries
2021-04-09 15:01:03 -07:00
Tibor Vass 5d5210745d deb/rpm: do not call cli Makefile that is changing
In https://github.com/docker/cli/pull/2993, Makefile target dynbinary
changed from a host script not depending on docker to a dockerized script.
Instead call the underlying script directly for deb/rpm.

I still think we should build deb/rpms using docker.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-09 19:46:21 +00:00
Tibor Vass 06c788d478 win: add arch in path for consistency with mac paths
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-09 19:46:07 +00:00
Tibor Vass c04ab6da6a arm: do not rely on host arch, specify --platform and CGO_ENABLED
Since we are building arm on arm64 machines we have to specify the desired platform
and not rely on the host's architecture.

Also when building arm on arm64 machines, there can be issues with cgo.
So this patch makes sure CGO_ENABLED env var gets passed on as a build arg.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-09 19:44:54 +00:00
Tibor Vass 60e28c914d plugins: update golang to 1.16.3 to build buildx on darwin/arm64
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-09 17:58:20 +00:00
Tibor Vass 7eb0491715 plugins: support multiple architectures
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-08 18:41:56 +00:00
Tibor Vass eb10cbb39c mac: build arm64 binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-08 18:41:50 +00:00
Sebastiaan van Stijn 824522741f Merge pull request #579 from thaJeztah/verify_update_comments_and_strategy
[ce-nightly] verify: remove old hack, and update comments to describe the process
2021-04-07 13:31:44 +02:00
Sebastiaan van Stijn fa57144c1d verify: remove old hack, and update comments to describe the process
- now that we added the '--no-upgrades' option in 60abadbc04,
  we no longer need the hack from 960961e76b
- add more comments, describing each step of the verify script, because
  it may not be obvious why we do some steps.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-07 10:55:31 +02:00
Tibor Vass 97eb4217e7 Merge pull request #577 from thaJeztah/no_upgrade_verify
[ce-nightly] verify: don't attempt to upgrade packages
2021-04-06 21:16:08 -07:00
Sebastiaan van Stijn 60abadbc04 verify: don't attempt to upgrade packages
If download-stage.docker.com already contains a previous build
of docker-ce/docker-ce-cli, apt attempts to install that version,
only to discover that it's an older build (and considered a "downgrade")

This patch (hopefully) fixes that case, by not attempting to upgrade.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-06 21:26:30 +02:00
Tibor Vass 27f8164552
Merge pull request #526 from makotom/patch-1
Always require iptables for libnetwork
2021-04-02 15:17:51 -07:00
Makoto Mizukami 06527ada00
Always require iptables for libnetwork
Signed-off-by: Makoto Mizukami <makoto@circleci.com>
2021-04-02 23:06:05 +02:00
Sebastiaan van Stijn d1557d9e6a
Merge pull request #539 from tiborvass/ubuntu_hirsute_fedora_34
deb/rpm: add forgotten Ubuntu hirsute and fedora-34 distros
2021-04-01 18:46:12 +02:00
Sebastiaan van Stijn 9a32046f29
Merge pull request #538 from thaJeztah/fix_plugin_build
Fix Fedora 34 Dockerfile to exclude scan-plugin on non-x86
2021-04-01 18:21:32 +02:00
Tibor Vass 20458a22e6 deb/rpm: add forgotten Ubuntu hirsute and fedora-34 distros
Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-01 15:57:34 +00:00
Sebastiaan van Stijn 1a270b739e
Fixe Fedora 34 Dockerfile to exclude scan-plugin on non-x86
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 17:39:21 +02:00
Tibor Vass f042386e78 Merge pull request #563 from thaJeztah/nightly_test_scan_plugin
[ce-nightly] Updates to build and verify docker-scan-plugin
2021-04-01 08:09:31 -07:00
Sebastiaan van Stijn 960961e76b verify: fix verify to account for scan-plugin on download.docker.com
Verify was failing, because we did a test-build to staging:

        docker-ce is already the newest version (5:0.0.0-20210401100358-59fd6f0-0~ubuntu-xenial).
        docker-ce-rootless-extras is already the newest version (5:0.0.0-20210401100358-59fd6f0-0~ubuntu-xenial).
        docker-ce-cli is already the newest version (5:0.0.0-20210401100358-59fd6f0-0~ubuntu-xenial).
        The following additional packages will be installed:
          containerd.io iptables libnfnetlink0 libxtables11
        The following NEW packages will be installed:
          containerd.io iptables libnfnetlink0 libxtables11
        The following packages will be DOWNGRADED:
          docker-scan-plugin

What's happening is that;

- first, we `dpkg-install` docker-ce, docker-ce-cli, and docker-scan-plugin
  from the packages we just built
- then, we `apt-get install` to verify that dependencies (`containerd`)
  are installed

However, we have `docker-scan-plugin` 0.7 on staging, which it then tries to
install, but sees it's an older build, so a _downgrade_

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 16:42:37 +02:00
Sebastiaan van Stijn 52cf182c38 verify: temporarily disable docker scan --version
It tries to make a daemon connection, which fails in this case;

        docker scan --accept-license --version
        Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
        Makefile:193: recipe for target 'verify' failed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 15:33:18 +02:00
Sebastiaan van Stijn 70e213c757 verify: run --version on installed binaries
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 15:33:15 +02:00
Tibor Vass 308e055df5
Merge pull request #537 from thaJeztah/scan_plugin_package
Build scan plugin as separate package
2021-04-01 06:28:34 -07:00
Sebastiaan van Stijn cd1cd9171c
Merge pull request #533 from thaJeztah/add_new_ubuntu_fedora
Add recipes for Ubuntu 21.04 "Hirsute Hippo" and Fedora 34
2021-04-01 13:25:57 +02:00
Sebastiaan van Stijn 34979922d9
plugins: disable scan-pluging build script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:34 +02:00
Sebastiaan van Stijn 3e781759f2
deb: separate docker-scan-plugin version from other versions
Override the package version manually until we have properly separated the
control files (etc.) for each package that we build.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:32 +02:00
Sebastiaan van Stijn b30ac69f11
deb: build separate deb for docker-scan
Need to separate this more, because currently, it will inherit
the package version from the cli/engine.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:27 +02:00
Sebastiaan van Stijn e0ba7d1752
rpm: build separate package for scan-plugin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:25 +02:00
Sebastiaan van Stijn a6aa399425
rpm/deb: strip "v" prefix from versions (if present)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:23 +02:00
Sebastiaan van Stijn 79cecb0d1a
scan installer: allow building without git
This allows building from a source tar.gz if the needed variables (COMMIT,
TAG_NAME, PLATFORM_BINARY) are set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:21 +02:00
Guillaume Tardif b998544617
Do not include scan plugin on arm packages
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-01 01:10:19 +02:00
Guillaume Tardif a88158f721
Use goproxy to make go mode download work on centos7 (old git version)
Alternative solution was to update git on centos7 in /rpm/SPEC/docker-ce-cli.spec: 
```
if [ "$SUITE" == "7" ]; then
    yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
    yum install -y git
fi
```

But rather not changing what is installed on the CEnTOS bistro for the entire CI pipeline

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-01 01:10:17 +02:00
Guillaume Lours 96fccb727f
Add installer for docker scan
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2021-04-01 01:10:14 +02:00
Sebastiaan van Stijn 6a476d0441 Merge pull request #569 from tiborvass/bundles_from_packaging
deb/rpm: reuse bundles targets from docker-ce-packaging
2021-04-01 00:44:08 +02:00
Tibor Vass 104ae81aa5
Merge pull request #536 from tiborvass/chown_debbuild
deb: create debbuild folder like it is done for rpm
2021-03-31 15:21:59 -07:00
Tibor Vass 5fa366ca68 deb: create debbuild folder like it is done for rpm
This is to fix a permissions issue with the release-packaging pipeline.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-03-31 20:22:50 +00:00
Tibor Vass 9d9ebb04b5 deb/rpm: reuse bundles targets from docker-ce-packaging
This is to avoid duplicate codepaths.
Note that this completes the move of the tar.gz logic from
release-packaging to docker-ce-packaging only for the deb/rpm cases.

Static Linux, Windows and Mac were not touched.

Also I still think this whole bundles tar.gz thing is useless,
but this is what release-repo is currently consuming.

This also makes rpms work, as the path structure changed in docker-ce-packaging
to include distro.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-03-30 19:57:13 +00:00
Tibor Vass 7519d80763
Merge pull request #535 from tiborvass/fix_bundles_arches
deb/rpm: make bundles rule compatible with release-packaging arch format
2021-03-30 11:48:33 -07:00
Tibor Vass c38fe50972 deb/rpm: make bundles rule compatible with release-packaging arch format
See comment in common.mk

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-03-30 18:13:18 +00:00
Tibor Vass e8e43043ed
Merge pull request #534 from tiborvass/bundles
deb/rpm: add target for bundles archive as consumed by release-repo
2021-03-29 13:41:43 -07:00
Tibor Vass 3b1f0d7b58 deb/rpm: add target for bundles archive as consumed by release-repo
This fixes a discrepancy between the rpmbuild and debbuild directory structure
and allows for a simple bundles archive target ready to be uploaded and consumed
by release-repo.

release-packaging could call these instead directly instead.

Example:

```
$ cd rpm && make rpmbuild/bundles-ce-centos-8-amd64.tar.gz
```

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-03-29 18:45:49 +00:00
Sebastiaan van Stijn 7101a708a2
Add Fedora 34
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-29 11:15:31 +02:00
Sebastiaan van Stijn b038017ffb
Add Ubuntu 21.04 "Hirsute Hippo"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-28 14:52:29 +02:00
Sebastiaan van Stijn 120831d7d6
Merge pull request #509 from tianon/cli-deps
Add "procps" to daemon "Recommends" (for "docker top")
2021-03-24 13:52:03 +01:00
Sebastiaan van Stijn 0ed527c4f5
Merge pull request #529 from thaJeztah/circular_dep
deb: change rootless-extras to "enhance", not "depend" on docker-ce
2021-03-24 13:28:35 +01:00
Silvin Lubecki 48959a1931
Merge pull request #532 from thaJeztah/ci_test_cross
Jenkinsfile: also test cross-compile for Mac, Windows
2021-03-24 10:59:10 +01:00
Sebastiaan van Stijn eb6c611ab8
Jenkinsfile: also test cross-compile for Mac, Windows
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-24 10:25:11 +01:00
Sebastiaan van Stijn 80d67bcb9c
deb: change rootless-extras to "enhance", not "depend" on docker-ce
Seen this error from a bug-report;

    dpkg: error processing package docker-ce (--configure):
     installed docker-ce package post-installation script subprocess returned error exit status 1
    dpkg: dependency problems prevent configuration of docker-ce-rootless-extras:
     docker-ce-rootless-extras depends on docker-ce; however:
      Package docker-ce is not configured yet.

    dpkg: error processing package docker-ce-rootless-extras (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
     docker-ce
     docker-ce-rootless-extras
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Looking through the possible options in the debian documantion:
https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends

We could pick `Pre-Depends` to wait with installing until `docker-ce` is fully
installed and configured, but but that's quite a strong relation, and from the
documentation:

    unlike with Depends, Pre-Depends does not permit circular dependencies to be
    broken. If a circular dependency is encountered while attempting to honor
    Pre-Depends, the installation will be aborted.

To prevent installations from being aborted, I picked `Enhances`;

    Enhances
    This field is similar to Suggests but works in the opposite direction. It
    is used to declare that a package can enhance the functionality of another package.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 20:51:40 +01:00
Tibor Vass 1c1cb918d8
Merge pull request #522 from thaJeztah/raspbian_bullseye
deb: add support for building raspbian 11 "Bullseye"
2021-02-23 11:29:42 -08:00
Tibor Vass 7889cc4fec
Merge pull request #521 from thaJeztah/debian_bullseye
deb: add support for building debian 11 "Bullseye"
2021-02-23 11:29:08 -08:00
Sebastiaan van Stijn 2185bf8912
deb: add support for building raspbian 11 "Bullseye"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 14:42:29 +01:00
Sebastiaan van Stijn 7b0be6bc5d
deb: add support for building debian 11 "Bullseye"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-19 14:41:00 +01:00
Sebastiaan van Stijn 69299369b9
Merge pull request #520 from thaJeztah/fix_build_dep
deb: make dh-systemd dependency optional as it's deprecated
2021-02-19 14:36:41 +01:00
Sebastiaan van Stijn 3e2748a5bd
Merge pull request #523 from thaJeztah/remove_fedora_31
[master] rpm: remove Fedora 31 as it's EOL
2021-02-18 11:13:01 +01:00
Sebastiaan van Stijn 6750f076f3
rpm: remove Fedora 31 as it's EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-21 22:29:17 +01:00
Sebastiaan van Stijn cd9edddb5a
deb: make dh-systemd dependency optional as it's deprecated
dh-systemd has been integrated into debhelper, starting with version 9.20160709,
and has been removed in Debian 11 "bullseye"

This patch updates the control file to not require it as a dependency
on current versions of debian that ship with that version of debhelper

Related discussions:

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822670
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=958585

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-01-15 19:52:15 +01:00
Sebastiaan van Stijn 4865d0386b
Merge pull request #516 from tiborvass/bump_buildx_0.5.1
Bump buildx to v0.5.1
2020-12-15 10:37:04 +01:00
Tibor Vass 269948b8e6 Bump buildx to v0.5.1
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-15 08:56:00 +00:00
Tibor Vass be5972b094
Merge pull request #515 from tiborvass/bump_buildx
Bump buildx to v0.5.0
2020-12-14 20:08:13 -08:00
Tibor Vass 4c2b9e4169 Bump buildx to v0.5.0
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-15 03:42:39 +00:00
Tibor Vass 747e984a03
Merge pull request #514 from thaJeztah/revert_after_multiuser
Revert "systemd: add multi-user.target to After list"
2020-12-10 10:14:17 -08:00
Sebastiaan van Stijn 3eb20305c0
Revert "systemd: add multi-user.target to After list"
This reverts commit 36bb01538e,
which caused the docker service to not be starting, or delayed
starting the service in certain conditions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-12-10 14:53:03 +01:00
Tianon Gravi 24c126254b Add "procps" to daemon "Recommends" (for "docker top")
Signed-off-by: Tianon Gravi <tianon@debian.org>
2020-12-08 13:13:58 -08:00
Tibor Vass 735928f52a
Merge pull request #513 from tiborvass/thanks-centos
centos-8: work around CentOS repo bug preventing to enable PowerTools
2020-12-08 10:51:08 -08:00
Tibor Vass 2bbbe3cd35 centos-8: work around CentOS repo bug preventing to enable PowerTools
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-12-08 18:27:35 +00:00
Sebastiaan van Stijn 0786df7dff
Merge pull request #508 from thaJeztah/carry_365
Do not "Bind" docker "To" containerd (carry #365)
2020-11-05 16:16:24 +01:00
Michał Kosek 22f15d4137
Do not "Bind" docker "To" containerd.
relates to https://github.com/docker/for-linux/issues/678

When using the BindTo directive, Docker is permanently stopped by systemd
when containerd is temporarily killed and restarted;

Using `Requires` achieves mostly the same, but defines a weaker dependency;

https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Requires=

> Requires=
>
> .. If this unit gets activated, the units listed will be activated as well.
> If one of the other units fails to activate, and an ordering dependency
> After= on the failing unit is set, this unit will not be started. Besides,
> with or without specifying After=, this unit will be stopped if one of the
> other units is explicitly stopped.

We may want to look into using `Wants=` instead of `Requires=`, because
that allows docker to continue running if containerd is restarted, quoting
the systemd documentation:

> Often, it is a better choice to use Wants= instead of Requires= in order
> to achieve a system that is more robust when dealing with failing services.

Given that docker will likely still fail if the containerd socket is not
present, startup will fail if containerd is not running, but if containerd
is restarted, the docker daemon may be able to try reconnecting.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-04 14:01:17 +01:00
Tibor Vass 855149b58f Merge pull request #553 from tiborvass/use-test-channel
[ce-nightly] Always use test channel when installing containerd
2020-10-22 15:00:53 -07:00
Tibor Vass c839f4e6ff Always use test channel when installing containerd
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-10-22 21:36:14 +00:00
Silvin Lubecki 57ae892b13
Merge pull request #502 from DeeDeeG/add-ubuntu-20.10-groovy-gorilla
Add Ubuntu 20.10 "Groovy Gorilla"
2020-10-20 17:18:59 +02:00
Sebastiaan van Stijn d4da1c4645
Merge pull request #501 from thaJeztah/systemd_oom_score
systemd: set OOMScoreAdjust for dockerd
2020-10-20 16:58:29 +02:00
Sebastiaan van Stijn 448803b920
Merge pull request #507 from thaJeztah/set_compat_version
deb: set compat version to 10
2020-10-20 16:47:47 +02:00
Sebastiaan van Stijn 190dfbe2d5
deb: set compat version to 10
Version 9 is deprecated:

    dh: warning: Compatibility levels before 10 are deprecated (level 9 in use)

Debian "stretch" and up have debhelper 10.0.0 or above, so all versions we
build for should support version 10 (or higher);
https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=debhelper

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-20 16:13:50 +02:00
DeeDeeG c8d79f15e0
Add Ubuntu 20.10 "Groovy Gorilla"
Signed-off-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-20 16:10:20 +02:00
Sebastiaan van Stijn 644c1dda54
Merge pull request #506 from thaJeztah/containerd_1.4
[master] Update minimum containerd.io version to v1.4.1
2020-10-20 14:01:08 +02:00
Sebastiaan van Stijn 3f2b79d15d
Update minimum containerd.io version to v1.4.1
Docker v20.10 ships with containerd.io v1.4.x, so setting the minimum
required version to v1.4.1 (current containerd.io release), as we won't
test / support older versions of containerd (and runc).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-20 12:59:13 +02:00
Tibor Vass 89f2ae2dc3
Merge pull request #505 from thaJeztah/add_fedora_33
Add Fedora 33 (beta)
2020-10-15 13:20:35 -07:00
Sebastiaan van Stijn 100f31916b
Add Fedora 33 (beta)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-13 10:06:15 +02:00
Sebastiaan van Stijn 4534b9c00f
Merge pull request #500 from Alok0587/master
To allow build for selective distros from top directory
2020-10-07 19:03:28 +02:00
Alok Kumar efb8fb1c6d To allow build for selective distros from top directory.
e.g.-
for rpm- RHEL_RELEASES= CENTOS_RELEASES= FEDORA_RELEASES=centos-8 make rpm
for deb- RASPBIAN_VERSIONS= UBUNTU_VERSIONS= DEBIAN_VERSIONS=ubuntu-xenial make deb

Signed-off-by: Alok Kumar <alok232549@gmail.com>
2020-10-07 19:44:20 +05:30
Sebastiaan van Stijn a78ed49ff5
systemd: set OOMScoreAdjust for dockerd
dockerd currently sets the oom-score-adjust itself. This functionality
was added when we did not yet run dockerd as a systemd service.

Now that we do, it's better to instead have systemd handle this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-05 20:08:26 +02:00
Tibor Vass 12d842d668
Merge pull request #480 from thaJeztah/bump_containerd_version
[master] Update minimum containerd.io version to v1.3.0
2020-09-17 11:51:38 -07:00
Sebastiaan van Stijn 2eec0a256e
Update minimum containerd.io version to v1.3.0
The engine now defaults to the "io.containerd.runc.v2" shim,
which is only available in containerd v1.3.0 and up.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-14 13:41:36 +02:00
Tibor Vass 7d6303c988 Merge pull request #535 from thaJeztah/ce_nightly_remove_stretch
[ce-nightly] Fix for upstream changes, and remove EOL distros
2020-08-29 10:44:37 +02:00
Sebastiaan van Stijn a3064417d6 Remove "docker-ce" prefix/sub-directory
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-28 18:46:51 +02:00
Sebastiaan van Stijn c19b2eec89
Merge pull request #496 from thaJeztah/refresh_apt_cache
[master] deb: update apt cache before running mk-build-deps
2020-08-27 19:48:59 +02:00
Tibor Vass 4a690573ba
Merge pull request #497 from thaJeztah/prune_cache
[master] prune build cache older than 24hrs as part of "clean"
2020-08-27 18:50:23 +02:00
Sebastiaan van Stijn c31fb7edeb
Prune build cache older than 24hrs as part of "clean"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-27 17:12:33 +02:00
Sebastiaan van Stijn 11bbb8d80c
deb: update apt cache before running mk-build-deps
mk-build-deps does not seem to be updating the cache by itself, and
because of that may be installing packages using an outdated package index
if the previous layer is in the build-cache:

    #6 [stage-1 2/8] RUN apt-get update && apt-get install -y curl devscripts e...
    #6 CACHED

    #8 [stage-1 3/8] COPY common /root/build-deb/debian
    #8 CACHED

    #9 [stage-1 4/8] RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-27 17:03:10 +02:00
Sebastiaan van Stijn 26b8ce64cc
Merge pull request #495 from thaJeztah/bump_buildx
[master] plugins: update buildx to v0.4.2
2020-08-24 18:32:25 +02:00
Sebastiaan van Stijn a6de61c48d
plugins: update buildx to v0.4.2
full diff: https://github.com/docker/buildx/compare/v0.4.1...v0.4.2

- bake: fix parsing json config with hcl v2
- bake: update go-cty to pull in more stdlib funcs
- bake: ensure --builder is wired from root options
- build: support cacheonly exporter
- build: improve error checking on load
- build: remove warning for multi-platform iidfile

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 09:54:15 +02:00
Silvin Lubecki 5496ae015b
Merge pull request #492 from thaJeztah/bump_golang_1.13.15
[master] bump Golang 1.13.15
2020-08-10 15:18:49 +02:00
Sebastiaan van Stijn 1e6aaf9d50
Bump Golang 1.13.15
full diff: https://github.com/golang/go/compare/go1.13.14...go1.13.15

go1.13.15 (released 2020/08/06) includes security fixes to the encoding/binary
package. See the Go 1.13.15 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.15+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-08 14:52:28 +02:00
Silvin Lubecki eb9999a9ae
Merge pull request #473 from thaJeztah/shallow_clone
[master] Makefile: use shallow clone
2020-08-06 15:23:08 +02:00
Sebastiaan van Stijn ddab5d3aac
Merge pull request #490 from thaJeztah/buildx_remove_experimental_gate
plugins: don't require "experimental" for buildx
2020-08-05 23:27:57 +02:00
Sebastiaan van Stijn 0b45cce1ab
plugins: don't require "experimental" for buildx
Some features of buildx may still be "experimental" / non-final,
but we can call those out individually if needed.

This change removes the requirement to enable "experimental" mode
in the cli configuration file, so that it's easier for users to
try buildx.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-04 12:44:34 +02:00
Silvin Lubecki f4071fd931
Merge pull request #489 from thaJeztah/sort_deps
[master] deb: format deb/common/control with wrap-and-sort
2020-08-03 16:32:22 +02:00
Sebastiaan van Stijn cf232a5b82
deb: format deb/common/control with wrap-and-sort
Formatted the file with the `wrap-and-sort` script, but kept the
comments that are in the file (which are stripped by the wrap-
and-sort script);

https://manpages.debian.org/buster/devscripts/wrap-and-sort.1.en.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-03 11:39:29 +02:00
Sebastiaan van Stijn 7435ad6ba5
Add checkout.sh to handle tags with shallow clones
fetching a tag ref does not download the tag itself.
This patch makes sure that the tag (or branch) is downloaded otherwise
fallsback to fetching the commit hash as it did before.

Co-Authored-By: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-31 20:09:13 +02:00
Sebastiaan van Stijn 44eed5234a
Makefile: use shallow clone
Before this change:

    make clean
    time make checkout
    git clone -q "https://github.com/docker/cli.git" src/github.com/docker/cli
    git clone -q "https://github.com/docker/docker.git" src/github.com/docker/docker
           69.16 real        15.69 user         9.69 sys

After this change:

    make clean
    time make checkout
    ...
    From https://github.com/docker/docker
     * branch            HEAD       -> FETCH_HEAD
    git -C src/github.com/docker/docker checkout -q FETCH_HEAD
           14.73 real         1.35 user         2.37 sys

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-31 08:59:40 +02:00
Sebastiaan van Stijn d5c1521ca5
Merge pull request #488 from IsaiahGrace/master
systemd: add multi-user.target to After list
2020-07-30 22:20:50 +02:00
Isaiah Grace 36bb01538e systemd: add multi-user.target to After list
Signed-off-by: Isaiah Grace <irgkenya4@gmail.com>
2020-07-29 17:13:04 -04:00
Sebastiaan van Stijn 5a7d3cd145
Merge pull request #487 from thaJeztah/debian_apparmor
[master] deb: add apparmor as "recommends" on Debian as well
2020-07-23 21:19:53 +02:00
Sebastiaan van Stijn 2db25bf1ec
deb: add apparmor as "recommends" on Debian as well
Debian did not have AppArmor available until Debian 7 "Wheezy", and not have it
enabled by _default_ until Debian 10 "Buster". The packaging scripts did not
add AppArmor as recommended dependency for that reason.

Now that Debian 10 "Buster" is the current stable, and older releases reached
EOL, we can remove the special handling for Debian/Ubuntu, and unconditionally
add apparmor as a recommended dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-23 17:38:14 +02:00
Sebastiaan van Stijn c3ff588436
Merge pull request #331 from PhilippHomann/master
docker-ce-cli lacks dependency to groupadd
2020-07-21 21:54:57 +02:00
Sebastiaan van Stijn 740b620188
Merge pull request #484 from AkihiroSuda/remove-eoan
Remove Ubuntu 19.10 "Eoan" (EOL: 2020-07-17)
2020-07-21 13:46:24 +02:00
Akihiro Suda a8f8e05d48
Remove Ubuntu 19.10 "Eoan" (EOL: 2020-07-17)
Ubuntu 19.10 "Eoan Ermine" reached EOL on 2020-07-17: https://wiki.ubuntu.com/Releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-21 15:24:51 +09:00
Sebastiaan van Stijn dfd1313cb6
Jenkinsfile: use Ubuntu 20.04 nodes for building
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-20 18:26:04 +02:00
Sebastiaan van Stijn 3ed868d15d
Merge pull request #481 from thaJeztah/bump_golang_1.13.14
Bump Golang 1.13.14
2020-07-17 15:55:36 +02:00
Sebastiaan van Stijn bab66bf987
Bump Golang 1.13.14
full diff: https://github.com/golang/go/compare/go1.13.13...go1.13.14

go1.13.14 (released 2020/07/16) includes fixes to the compiler, vet, and the
database/sql, net/http, and reflect packages. See the Go 1.13.14 milestone on
the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.14+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-17 15:23:40 +02:00
Sebastiaan van Stijn 679dd2fb2c
Merge pull request #478 from thaJeztah/bump_golang
Update Golang 1.13.13
2020-07-17 15:22:36 +02:00
Sebastiaan van Stijn 611a2e5fac
Merge pull request #474 from AkihiroSuda/rootless-deb
Add docker-ce-rootless-extras deb & rpm
2020-07-16 20:35:15 +02:00
Sebastiaan van Stijn c3cbb60891
Update Golang 1.13.13
Bump Golang 1.13.13
--------------------------

full diff: https://github.com/golang/go/compare/go1.13.12...go1.13.13

go1.13.13 (released 2020/07/14) includes security fixes to the crypto/x509 and
net/http packages. See the Go 1.13.13 milestone on the issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.13+label%3ACherryPickApproved

Bump Golang 1.13.12
--------------------------

full diff: https://github.com/golang/go/compare/go1.13.11...go1.13.12

go1.13.12 (released 2020/06/01) includes fixes to the runtime, and the go/types and
math/big packages. See the Go 1.13.12 milestone on our issue tracker for details.

https://github.com/golang/go/issues?q=milestone%3AGo1.13.12

Bump Golang 1.13.11
--------------------------

full diff: https://github.com/golang/go/compare/go1.13.10...go1.13.11

go1.13.11 (released 2020/05/14) includes fixes to the compiler. See the Go 1.13.11
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.11+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-15 11:21:52 +02:00
Sebastiaan van Stijn c79511bc0f
Merge pull request #476 from AkihiroSuda/remove-debian-9
Remove Debian 9 "Stretch" (EOL: 2020-07-06)
2020-07-09 21:28:26 +02:00
Silvin Lubecki 7bb1e4f2a1
Merge pull request #477 from AkihiroSuda/readme-add-centos-8
README.md: add CentOS 8 and RHEL 7
2020-07-09 15:17:14 +02:00
Akihiro Suda 3f2df7d5c7
README.md: add CentOS 8 and RHEL 7
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-08 16:12:10 +09:00
Akihiro Suda cfc4e7c240
Remove Debian 9 "Stretch" (EOL: 2020-07-06)
Debian GNU/Linux 9 "Stretch" reached EOL on 2020-07-06: https://wiki.debian.org/DebianReleases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-08 16:09:18 +09:00
Akihiro Suda e8bb3dc2fd
Add docker-ce-rootless-extras rpm
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-08 15:42:23 +09:00
Akihiro Suda 17c17fb73c
Add docker-ce-rootless-extras deb
$ dpkg -c ./docker-ce-rootless-extras_0.0.0-20200611183532-31822ff745-0~ubuntu-eoan_amd64.deb
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./usr/
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./usr/bin/
  -rwxr-xr-x root/root     11724 2020-06-12 15:55 ./usr/bin/dockerd-rootless-setuptool.sh
  -rwxr-xr-x root/root      3138 2020-06-12 15:55 ./usr/bin/dockerd-rootless.sh
  -rwxr-xr-x root/root  15741392 2020-06-12 15:55 ./usr/bin/rootlesskit
  -rwxr-xr-x root/root   9344264 2020-06-12 15:55 ./usr/bin/rootlesskit-docker-proxy
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./usr/share/
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./usr/share/doc/
  drwxr-xr-x root/root         0 2020-06-12 15:55 ./usr/share/doc/docker-ce-rootless-extras/
  -rw-r--r-- root/root       160 2020-06-12 15:55 ./usr/share/doc/docker-ce-rootless-extras/changelog.Debian.gz

NOTE: VPNKit is not included (yet), as it takes a lot of time for
compilation. We could use prebuilt VPNKit binary as we use in the static
tgz, but it is only available for amd64 and in Docker image currently.

This is not problematic for Ubuntu >= 19.10 and Debian >= 11, because
slirp4netns is apt-installable instead of VPNKit.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-07-08 15:41:29 +09:00
Silvin Lubecki 14bf953b32
Merge pull request #475 from AkihiroSuda/eol-202006
Remove Fedora 30 and Ubuntu 19.04
2020-06-16 14:13:27 +02:00
Akihiro Suda 38aadeca5e
Remove Ubuntu 19.04 "Disco Dingo" (EOL: 2020-01-23)
Ubuntu 19.04 "Disco Dingo" reached EOL on 2020-01-23: https://fridge.ubuntu.com/2020/01/23/ubuntu-19-04-disco-dingo-end-of-life-reached-on-january-23-2020/

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-12 17:17:41 +09:00
Akihiro Suda acaecc494a
Remove Fedora 30 (EOL: 2020-05-26)
Fedora 30 reached EOL on 2020-05-26: https://fedoraproject.org/wiki/End_of_life

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-06-12 16:12:48 +09:00
Silvin Lubecki d589f47700
Merge pull request #457 from thaJeztah/switch_to_upstream
[master] fetch source from upstream docker/docker repository
2020-06-11 15:05:39 +02:00
Sebastiaan van Stijn f0626d62b1
Merge pull request #472 from tianon/suggests
Downgrade "aufs-tools" and "cgroupfs-mount" to "Suggests"
2020-05-28 18:18:50 +02:00
Sebastiaan van Stijn ebe9dc7cf4
Add Makefile targets to checkout from source
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-28 16:12:26 +02:00
Sebastiaan van Stijn 30500d7314
Makefile: move CHOWN to common.mk
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-28 16:10:52 +02:00
Sebastiaan van Stijn 0c0da4d625
Jenkinsfile: remove VERSION makefile argument
A default version is already set in the Makefile itself

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-28 16:10:49 +02:00
Tianon Gravi 74939c1e83 Downgrade "aufs-tools" and "cgroupfs-mount" to "Suggests"
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-05-27 15:31:01 -07:00
Sebastiaan van Stijn dcf1d8699e
Merge pull request #471 from AkihiroSuda/dockerd-rootless-setuptool.sh
docker-rootless-extras: add dockerd-rootless-setuptool.sh
2020-05-27 18:34:54 +02:00
Akihiro Suda 896c278dad docker-rootless-extras: add dockerd-rootless-setuptool.sh
dockerd-rootless-setuptool.sh was added to Moby in https://github.com/moby/moby/pull/40950

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-05-22 04:14:09 +09:00
Silvin Lubecki 943d7934e8 Merge pull request #526 from thaJeztah/ce_nightly_verify_from_stage
[ce-nightly] Verify: use "download-stage.docker.com" as default for deps
2020-05-14 17:08:11 +02:00
Sebastiaan van Stijn acd8612479 Verify: use "download-stage.docker.com" as default for deps
This allows running the verify step in situations where containerd.io
has not yet been pushed to the production package repo.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-14 16:43:40 +02:00
Sebastiaan van Stijn fcbe36668d
Merge pull request #465 from AkihiroSuda/containerd-shim-runc-v2
static: add containerd-shim-runc-v2
2020-05-13 07:51:37 +02:00
Tibor Vass 1c4fdf5119
Merge pull request #470 from thaJeztah/pr_build_centos8
[master] Build CentOS 8 on PR builds and fix GPG errors
2020-05-08 10:21:29 -07:00
Sebastiaan van Stijn 29b0f08e47
Jenkinsfile: build CentOS 8 on PR builds
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-08 18:41:19 +02:00
Sebastiaan van Stijn 418dc29193
CentOS 8: manually import GPG key
RHEL8 / CentOS 8 changed behavior and no longer "rpm --import" or
"rpmkeys --import"as part of rpm package's %post scriplet. See
https://forums.centos.org/viewtopic.php?f=54&t=72574, and
https://access.redhat.com/solutions/3720351

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-08 18:39:48 +02:00
Akihiro Suda 912015018b static: add containerd-shim-runc-v2
containerd-shim-runc-v2 is used in cgroup v2 mode

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-05-08 08:52:21 +09:00
Silvin Lubecki f062a0d867
Merge pull request #468 from thaJeztah/deb_noninteractive
[master] deb: use DEBIAN_FRONTEND=noninteractive for all dockerfiles
2020-05-04 16:21:17 +02:00
Sebastiaan van Stijn fb44c6edea
deb: use DEBIAN_FRONTEND=noninteractive for all dockerfiles
This was needed for Ubuntu 20.04, but doesn't hurt to use
for other versions as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 22:58:24 +02:00
Tibor Vass 087705d471
Merge pull request #461 from thaJeztah/use_docker_docker
[master] Jenkinsfile: use docker/docker instead of docker/engine
2020-05-01 13:55:51 -07:00
Tibor Vass e2dc8caf51
Merge pull request #466 from thaJeztah/remove_ubuntu_18.10
[master] Remove Ubuntu 18.10 "cosmic", as it reached EOL
2020-05-01 13:39:47 -07:00
Tibor Vass c14f002bc3
Merge pull request #463 from thaJeztah/master_rhel_iptables
[master] RHEL8 iptables build fix (#410)
2020-05-01 12:59:44 -07:00
Sebastiaan van Stijn 4a90d5aa2a
Remove Ubuntu 18.10 "cosmic", as it reached EOL
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 21:50:45 +02:00
Dmitry Makovey 836237c4f4
RHEL8 iptables build fix (#410)
add optional requirement for nftables on RHEL8+ derivatives

(cherry picked from commit cfc7f43d3e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 21:33:17 +02:00
Silvin Lubecki 75041fea28
Merge pull request #460 from tonistiigi/buildx-v0.4
[master] buildx: use v0.4.1
2020-05-01 18:51:09 +02:00
Sebastiaan van Stijn cf0b953510
Merge pull request #462 from thaJeztah/chown_engine
Makefile: chown engine dir during cleanup
2020-05-01 15:15:52 +02:00
Sebastiaan van Stijn d2395a37a9
Makefile: chown engine dir during cleanup
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 14:39:23 +02:00
Tonis Tiigi 50aa8f20fd buildx: use v0.4.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-30 16:07:50 -07:00
Sebastiaan van Stijn 30635cbfd9
Jenkinsfile: use docker/docker instead of docker/engine
The release branches have moved back to the upstream docker/docker
repository, so we should use that as source instead of the docker/engine
fork (and rely on it being synced with upstream)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-30 19:06:53 +02:00
Tibor Vass f969b6486b
Merge pull request #459 from StefanScherer/add-rhel-7-s390x
[master] Add rhel for s390x
2020-04-28 14:20:49 -07:00
Stefan Scherer 6ea7ea0b78
Add rhel for s390x
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2020-04-28 17:40:45 +02:00
Sebastiaan van Stijn a63b2eee8b
Merge pull request #458 from silvin-lubecki/bump-docker-app
Bump docker-app to the latest release 0.9.1-beta3
2020-04-24 15:30:10 +02:00
Silvin Lubecki c0203c41a9 Bump docker-app to the latest release 0.9.1-beta3
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-04-24 15:06:37 +02:00
Silvin Lubecki 74d712ddaa
Merge pull request #455 from thaJeztah/gomod_vendor
[master] plugins/buildx: force go modules to use vendor mode
2020-04-21 12:00:26 +02:00
Sebastiaan van Stijn cca0c0e994
plugins/buildx: force go modules to use vendor mode
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 10:58:56 +02:00
Silvin Lubecki c4accf89b6 Merge pull request #500 from thaJeztah/remove_docker_ce_repo
[ce-nightly] build from upstream repositories instead of docker-ce mono-repo
2020-04-15 16:52:42 +02:00
Silvin Lubecki 97abcfdd5f
Merge pull request #451 from thaJeztah/carry_add_ubuntu_20.04_focal_fossa
Add Ubuntu 20.04 Focal Fossa
2020-04-14 16:44:20 +02:00
Silvin Lubecki 1648bd194e
Merge pull request #453 from thaJeztah/bump_golang_1.13.10
Bump Golang 1.13.10
2020-04-14 16:38:02 +02:00
Sebastiaan van Stijn 382364f55a
Bump Golang 1.13.10
go1.13.10 (released 2020/04/08) includes fixes to the go command, the runtime,
os/exec, and time packages. See the Go 1.13.10 milestone on the issue tracker
for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.13.10+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.13.9...go1.13.10

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-14 14:12:59 +02:00
Tibor Vass 61b1032754
Merge pull request #452 from thaJeztah/add_fedora_32
Add Fedora 32, remove Fedora 29
2020-04-10 17:00:15 -07:00
Sebastiaan van Stijn b6331a2a58
Add Fedora 32, remove Fedora 29
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-11 00:25:55 +02:00
Sebastiaan van Stijn f1a0fdbd95
Enable Ubuntu Focal in Jenkinsfile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-11 00:19:01 +02:00
DeeDeeG 1baf61ac94
Add Ubuntu 20.04 Focal Fossa
Signed-off-by: DeeDeeG <DeeDeeG@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-11 00:18:50 +02:00
Tibor Vass 87deaf443b
Merge pull request #447 from thaJeztah/remove_devmapper_requires
rpm: remove devicemapper requirement
2020-04-10 12:59:52 -07:00
Sebastiaan van Stijn 217d1d2f0f
Merge pull request #450 from tao12345666333/bump-golang
Update Golang 1.13.9
2020-04-07 09:08:35 +02:00
Jintao Zhang e347bb9551 Update Golang 1.13.9
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-04-07 11:02:02 +08:00
Sebastiaan van Stijn 6d241dc8cd Remove "components" subdirectory
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-06 16:56:50 +02:00
Silvin Lubecki d154ec00bb
Merge pull request #449 from glours/split_debian_package
Replace the default common commit by a specific one for cli and engin…
2020-04-06 15:40:43 +02:00
Guillaume Lours e7548a4665 Replace the default common commit by a specific one for cli and engine for DEB packaging
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-03 17:23:19 +02:00
Guillaume Lours 49e0a0d7e4 Replace the default common commit by a specific one for cli and engine for RPM packaging
Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
2020-04-03 10:41:43 +02:00
Silvin Lubecki 64dd0e75ea
Merge pull request #448 from thaJeztah/add_format
deb: add missing format version
2020-04-02 17:17:33 +02:00
Sebastiaan van Stijn 895cade68c
deb: add missing format version
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
    ...
    dpkg-source: info: using source format '1.0'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-02 11:33:21 +02:00
Sebastiaan van Stijn a52e60992f
rpm: remove devicemapper requirement
devicemapper is now an optional configuration, so we
shouldn't make it a required dependency.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-01 16:50:35 +02:00
Sebastiaan van Stijn ac9bcdfb73
Merge pull request #446 from thaJeztah/fix_arm64_builds
CentOS: fix failing repository on aarch64 (arm64)
2020-03-25 23:47:20 +01:00
Sebastiaan van Stijn 170199f34b
CentOS: fix failing repository on aarch64 (arm64)
This repository is only specified in the aarch64 (arm64) images,
and therefore was not caught in CI.

Bringing back the fix that was previously there, to prevent failures:

    #9 [stage-1 4/6] RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
    #9 0.982 Loaded plugins: fastestmirror, ovl
    #9 1.177 Enabling base-source repository
    #9 1.177 Enabling extras-source repository
    #9 1.178 Enabling updates-source repository
    #9 1.179 Loading mirror speeds from cached hostfile
    #9 1.181  * base: d36uatko69830t.cloudfront.net
    #9 1.182  * extras: d36uatko69830t.cloudfront.net
    #9 1.182  * updates: d36uatko69830t.cloudfront.net
    #9 2.272 http://vault.centos.org/altarch/7/extras/Source/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
    #9 2.272 Trying other mirror.
    #9 2.273 To address this issue please refer to the below wiki article

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-25 12:23:20 +01:00
Sebastiaan van Stijn b41438a3b6
Merge pull request #445 from thaJeztah/tweak_rpm
rpm: various fixes and clean-ups
2020-03-23 18:27:20 +01:00
Sebastiaan van Stijn 67e586ddc0
rpm: consistently use curly brackets for env-vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-23 13:40:30 +01:00
Sebastiaan van Stijn 8ef2b7487f
rpm: use macros/env-vars instead of hard-coded paths
Use the [built-in macros][1] and env-vars for some paths:

- Use `%{_libexecdir}` macro, instead of `/usr/libexec`
- Use `%{_datadir}` instead of `/usr/share`
- Use `%{_specsdir}` instead of `/root/rpmbuild/SPECS`
- Use `$RPM_BUILD_DIR` instead of `/root/rpmbuild/BUILD`
- Use `$RPM_SOURCE_DIR` instead of `/root/rpmbuild/SOURCES`

[1]: https://rpm.org/user_doc/macros.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-23 13:38:57 +01:00
Sebastiaan van Stijn 5da1da51b9
rpm: fix double slashes in paths
The built-in macros for paths all have a leading slash, so removing
slashes that were manually added before them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-23 13:36:17 +01:00
Sebastiaan van Stijn 3210928488
rpm: replace %{buildroot} with $RPM_BUILD_ROOT
From the [RPM mailinglist][1]:

> `$RPM_BUILD_ROOT` is the official, supported, mechanism for getting the
> value of the configured build root in a build scriptlet.
>
> `%{buildroot}` may be changed in the future w/o warning. Not that I'm planning
> on that, but you've been warned.

[1]: https://www.redhat.com/archives/rpm-list/2002-July/msg00121.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-23 13:30:40 +01:00
Sebastiaan van Stijn c92ef9a62b
Merge pull request #444 from thaJeztah/fix_centos8
Fix CentOS 8 build
2020-03-23 11:00:13 +01:00
Sebastiaan van Stijn a03dda0f70
Fix CentOS 8 build
- Enable PowerTools repo
- Disable building btrfs, which is no longer supported on
  CentOS/RHEL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-20 18:38:12 +01:00
Sebastiaan van Stijn 5456096b03
Merge pull request #416 from arkodg/add-centos-8
Add Support for Centos-8
2020-03-13 17:03:45 +01:00
Arko Dasgupta 8b4a45a6cd Undo baseurl string replace for altarch
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-03-13 08:40:31 -07:00
Arko Dasgupta ec3b30b6a4 Add Support for Centos-8
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-03-13 08:40:31 -07:00
Sebastiaan van Stijn 486c47f693
Merge pull request #437 from docker/readme-ubuntu-19.10
Update README to include Ubuntu 19.10
2020-03-12 15:07:26 +01:00
Silvin Lubecki 5c1d24e0e1
Merge pull request #441 from thaJeztah/socket_activation
Don't disable socket activation when stopping docker service
2020-03-12 14:56:16 +01:00
Silvin Lubecki e7ba930746
Merge pull request #442 from thaJeztah/more_cleanups
more cleaning up
2020-03-12 14:19:29 +01:00
Sebastiaan van Stijn d4fff334ed
static/Makefile: also use CLI_DIR for git-commit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 16:13:21 +01:00
Sebastiaan van Stijn 547ac1b345
indent shell-scripts with tabs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 16:12:43 +01:00
Sebastiaan van Stijn 9480e41a44
gen-*-ver: sync formatting, and reorder some steps
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 16:05:33 +01:00
Sebastiaan van Stijn e2528bb27e
gen*ver: rename ENGINE_DIR to REPO_DIR
once we build from upstream repositories, CLI and Engine
will have different git commits; prepare for those changes
by making the variable name more generic.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:54:17 +01:00
Sebastiaan van Stijn 7274a82022
Makefile: rename DEB_VERSION, STATIC_VERSION to GEN_*_VER
DEB_VERSION and STATIC_VERSION are a macro (evaluated/expanded when
called), so renaming them makes it more clear that they're expanded
at that point. GEN_*_VER is also in line with the equivalent
GEN_RPM_VERSION in the rpm/Makefile.

The environment variable used in the container (and scripts) is
kept as DEB_VERSION.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:21:24 +01:00
Sebastiaan van Stijn 50b45bcfeb
Makefile: remove STATIC_VERSION from deb/rpm
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:21:14 +01:00
Sebastiaan van Stijn 5f8157e9bf
Makefile: use $(@D) automatic variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:07 +01:00
Sebastiaan van Stijn a6a8d77d15
Makefile: remove SOURCE_FILES, SOURCES variables
We were not currently using these to override, so may as well
remove them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:07 +01:00
Sebastiaan van Stijn e284fd955c
Makefile: sync rpm/deb and add RUN_FLAGS
Sync formatting, and add RUN_FLAGS for rpm (it was available
for deb), so allow adding custom flags, without having to
define the whole RUN command.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:06 +01:00
Sebastiaan van Stijn ad03155398
rpm/Makefile: use DISTROS intermediate variable, similar to deb
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:06 +01:00
Sebastiaan van Stijn 2b08af4109
rpm/Makefile: run should not need --privileged
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:05 +01:00
Sebastiaan van Stijn 05be81642d
Makefile: no need to run interactive
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:16:04 +01:00
Sebastiaan van Stijn 06ff3c299a
rpm/Makefile: remove parameterization of Dockerfile
All images used are multi-arch now, so no need to parameterize

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:15:53 +01:00
Sebastiaan van Stijn 3bcf897271
Makefile: lazily expand paths
This should prevent situations where the target directory
does not yet exist when make is called.

given the following makefile:

    DIRECT := $(realpath ./direct)
    LAZY = $(realpath ./lazy)

    clean:
            @rm -rf ./direct ./lazy

    source:
            @mkdir -p direct lazy

    build: source
            @echo DIRECT is $(DIRECT)
            @echo LAZY is $(LAZY)

Running the below, will show that only "LAZY" shows the
correct path:

    make clean && make build
    DIRECT is
    LAZY is /Users/sebastiaan/Projects/test/lazy

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:15:45 +01:00
Sebastiaan van Stijn 979ccaef67
Makefile: sync variables between "deb", "rpm", and "static"
- expand `PLUGINS_DIR` when "used" instead of when declared
- consistently use CLI_DIR to determin GITCOMMIT. When building from
  the docker/docker-ce monorepo, this should make no difference, but
  when building from the upstream repositories, this prevents the
  rpm and deb packages to have a different commit specified.
- only set GO_IMAGE if it's not yet defined

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:12:42 +01:00
Sebastiaan van Stijn 257e7e0b18
Merge pull request #30 from tianon/license
Add LICENSE (copy of docker/docker's Apache-2.0 file)
2020-03-11 13:57:32 +01:00
Guillaume LOURS 13e95018ea
Merge pull request #439 from silvin-lubecki/check-buildx-master
Bump buildx to master to check if it builds on the CI
2020-03-05 11:22:25 +01:00
Sebastiaan van Stijn d7aee01efc
Don't disable socket activation when stopping docker service
PartOf deactivates the socket whenever the service get deactivated.
The socket unit however should be active nevertheless, so that the
docker service can be started again through socket activation.

Based on the original patch in upstream moby/moby by Max Harmathy.

Co-authored-by: Max Harmathy <max.harmathy@web.de>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-04 13:19:42 +01:00
Silvin Lubecki 4ee45489f6
Merge pull request #440 from thaJeztah/remove_unused_variable
deb: remove unused DOCKER_GOPATH variable
2020-03-04 10:50:12 +01:00
Sebastiaan van Stijn c4c61802fd
deb: remove unused DOCKER_GOPATH variable
This variable was added in 09b3ac888d
but appears to be unused.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-04 09:39:20 +01:00
Sebastiaan van Stijn 90d7b670f6
Merge pull request #438 from silvin-lubecki/fix-windows-extension
Fix windows exe extension not added by docker/cli cross build scripts.
2020-03-03 17:23:26 +01:00
Silvin Lubecki 0dddbfcc26 Bump buildx to master to check if it builds on the CI
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-03-03 11:45:24 +01:00
Silvin Lubecki 49da4df5b1 Fix windows exe extension not added by docker/cli cross build scripts.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2020-02-27 15:48:33 +01:00
Christopher Crone 762501e2c3 Update README to include Ubuntu 19.10
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-02-27 12:39:48 +01:00
Silvin Lubecki 5adece113c
Merge pull request #436 from thaJeztah/bump_golang_1.13
[master] Update Golang 1.13.8
2020-02-26 17:21:06 +01:00
Sebastiaan van Stijn c7ed6740f5
Update Golang 1.13.8
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 15:23:19 +01:00
Silvin Lubecki f334cacc7d
Merge pull request #435 from thaJeztah/its_a_stretch_but_buster_it
[master] use "buster" variant of Go images
2020-02-26 14:43:18 +01:00
Sebastiaan van Stijn c6c6cecb52
Use "buster" variant of Go images
Debian Buster is now the current "stable", and will be the
default baseimage for Golang images going forward.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-26 13:58:13 +01:00
Sebastiaan van Stijn 24b21073aa install-containerd-helpers: fix hard-coded repository for RPMs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 18:27:51 +01:00
Sebastiaan van Stijn dfd278c8b3 install-containerd-helpers: make sure ca-certificates are up-to-date
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 18:24:32 +01:00
Sebastiaan van Stijn 68e8179685 verify: install ca-certs, and use "--no-install-recommends"
ca-certs was not installed (or outdated) in the raspbian
images, so explicitly install it.

Also adding "--no-install-recommends" flag, to force explicitly
including packages we need, instead of the implicitly
being installed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 18:24:29 +01:00
Sebastiaan van Stijn 533897891b fix some linting warnings
Move the `ARCH` variable to the containerd script, as that's where it's
used

use the `pkg_config_manager` variable, which is not strictly nescessary
(main use of the variable looks to be for `install_rpm_containerd`),
but using the variable prevents linting warnings.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 18:24:25 +01:00
Sebastiaan van Stijn 849e2db93d verify: use tabs for indentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-24 18:23:25 +01:00
Sebastiaan van Stijn 72fe7e112f install-containerd-helpers: use tabs for indentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-20 13:14:42 +01:00
Silvin Lubecki 65bd76b092
Merge pull request #431 from thaJeztah/bump_golang_1.12.17
[master] Update Golang 1.12.17
2020-02-19 10:23:43 +01:00
Sebastiaan van Stijn 06207cb8c0
Update Golang 1.12.17
full diff: https://github.com/golang/go/compare/go1.12.16...go1.12.17

go1.12.17 (released 2020/02/12) includes a fix to the runtime. See the Go 1.12.17
milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.17+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-17 17:44:03 +01:00
Sebastiaan van Stijn 0ac2fa98e1 Merge pull request #475 from thaJeztah/ce_nightly_backport_fix_verify
[ce-nightly backport] Fix verify to not depend on download.docker.com
2020-02-06 16:57:50 +01:00
Sebastiaan van Stijn 8dac84e9ec verify: use --force-depends to be more future proof
Use the --force-depends in case other dependencies are
added in future, which would make dpkg -i fail.

Also bring back --no-install-recommmends to make install
slightly faster, and document the steps we're doing in
this script:

    Install the locally built packages using 'dpkg' because installing with
    'apt-get' would attempt to install dependency packages (such as the CLI)
    from download.docker.com instead of the locally built CLI package. Given
    that 'dpkg -i' does not install any dependency (but will fail if depen-
    dencies are missing), we use the '--ignore-depends' option to ignore
    packages we know to be missing at this stage, and '--force-depends' to
    only warn about any other missing dependency.

    Afterwards, we run 'apt-get install' with the '--fix-broken' option to
    trigger installation of the dependencies, which should succceed succesfully.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7da772e08ba12a09471650dc5b6d311c39470668)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-06 13:52:29 +01:00
Sebastiaan van Stijn 5c12ba8d7a Fix verify to not depend on download.docker.com
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 3880335d06a5960bc5754d4dc9c5c796ae06885b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-02-06 13:52:26 +01:00
Sebastiaan van Stijn 3f3a9edf67
Merge pull request #428 from thaJeztah/bump_golang_1.12.16
Update Golang 1.12.16 (CVE-2020-0601, CVE-2020-7919)
2020-01-29 23:30:39 +01:00
Sebastiaan van Stijn 81ce4708a4
Update Golang 1.12.16 (CVE-2020-0601, CVE-2020-7919)
full diff: https://github.com/golang/go/compare/go1.12.15...go1.12.16

go1.12.16 (released 2020/01/28) includes two security fixes. One mitigates the
CVE-2020-0601 certificate verification bypass on Windows. The other affects only
32-bit architectures.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.16+label%3ACherryPickApproved

- X.509 certificate validation bypass on Windows 10
  A Windows vulnerability allows attackers to spoof valid certificate chains when
  the system root store is in use. These releases include a mitigation for Go
  applications, but it’s strongly recommended that affected users install the
  Windows security update to protect their system.
  This issue is CVE-2020-0601 and Go issue golang.org/issue/36834.
- Panic in crypto/x509 certificate parsing and golang.org/x/crypto/cryptobyte
  On 32-bit architectures, a malformed input to crypto/x509 or the ASN.1 parsing
  functions of golang.org/x/crypto/cryptobyte can lead to a panic.
  The malformed certificate can be delivered via a crypto/tls connection to a
  client, or to a server that accepts client certificates. net/http clients can
  be made to crash by an HTTPS server, while net/http servers that accept client
  certificates will recover the panic and are unaffected.
  Thanks to Project Wycheproof for providing the test cases that led to the
  discovery of this issue. The issue is CVE-2020-7919 and Go issue golang.org/issue/36837.
  This is also fixed in version v0.0.0-20200124225646-8b5121be2f68 of golang.org/x/crypto/cryptobyte.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-29 23:05:47 +01:00
Sebastiaan van Stijn d06b56d3ac
Merge pull request #427 from thaJeztah/update_unir_reviewers
update list of reviewers in unir config
2020-01-22 16:34:39 +01:00
Sebastiaan van Stijn 1a46b9cb14
Merge pull request #426 from thaJeztah/remove_more_image_remnants
Remove more remnants from image-based engine
2020-01-22 15:52:02 +01:00
Sebastiaan van Stijn f2d6d9c360
update list of reviewers in unir config
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-22 15:11:00 +01:00
Sebastiaan van Stijn f5975a7468
Remove more remnants from image-based engine
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-22 14:44:13 +01:00
Sebastiaan van Stijn d7e9b7a69a
Merge pull request #421 from thaJeztah/enable_buildkit
Makefile: enable buildkit when building images
2020-01-22 13:40:12 +01:00
Sebastiaan van Stijn fc688cdf76
Merge pull request #418 from thaJeztah/bump_golang_1.12.15
Update Golang 1.12.15
2020-01-22 13:30:26 +01:00
Sebastiaan van Stijn 7730ce0683
Merge pull request #420 from thaJeztah/remove_activate_remnants
Remove some remnants related to image-based builds
2020-01-21 21:52:45 +01:00
Sebastiaan van Stijn 863ec11db1
Makefile: enable buildkit when building images
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-21 19:13:19 +01:00
Sebastiaan van Stijn ca7079597f
Remove some remnants related to image-based builds
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-21 16:25:12 +01:00
Sebastiaan van Stijn bb5bfeee12
Merge pull request #411 from thaJeztah/remove_engine_activate
Remove image-based build (for docker engine activate)
2020-01-21 15:57:01 +01:00
Sebastiaan van Stijn d553c9e48a
Update Golang 1.12.15
Update Golang 1.12.15
-------------------------------

full diff: https://github.com/golang/go/compare/go1.12.14...go1.12.15

go1.12.15 (released 2020/01/09) includes fixes to the runtime and the net/http
package. See the Go 1.12.15 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.15+label%3ACherryPickApproved

Update Golang 1.12.14
-------------------------------

go1.12.14 (released 2019/12/04) includes a fix to the runtime. See the Go 1.12.14
milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.14+label%3ACherryPickApproved

Update Golang 1.12.13
-------------------------------

go1.12.13 (released 2019/10/31) fixes an issue on macOS 10.15 Catalina where the
non-notarized installer and binaries were being rejected by Gatekeeper. Only macOS
users who hit this issue need to update.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-01-21 13:16:30 +01:00
docker-unir[bot] 3463279691
Merge pull request #412 from arkodg/build-ubuntu-eoan
Merged with https://github.com/seemethere/unir
2019-12-11 23:05:34 +00:00
Arko Dasgupta d87aaa3f7c Add build target for ubuntu-eoan
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-12-05 15:11:39 -08:00
Sebastiaan van Stijn 5b8545ff87
Remove image-based build (for docker engine activate)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-05 16:09:00 +01:00
Zuhayr Elahi 2725cc3664
Merge pull request #407 from eunomie/docker-app-0.9.0-beta-1
bump docker-app to 0.9.0-beta1
2019-11-12 15:39:15 -08:00
Yves Brissaud 69bf86766b bump docker-app to 0.9.0-beta1
Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
2019-11-08 15:19:55 +01:00
Eli Uriegas 28a0f18a2d
unir: Remove old maintainers, add new ones (#406)
unir: Remove old maintainers, add new ones
2019-10-30 13:34:28 -07:00
Eli Uriegas 2ddcc91527
unir: Remove old maintainers, add new ones
I'm leaving Docker Inc. so it'd probably be best to remove me from the
automerge capabilities. I've also taken the liberty to remove other old
maintainers.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-10-30 20:06:04 +00:00
docker-unir[bot] 6c40c4fec1
Merge pull request #398 from thaJeztah/bump_golang_1.12.12
Merged with https://github.com/seemethere/unir
2019-10-29 01:20:47 +00:00
Eli Uriegas f91c8c69b0
[master] Dockerfiles: re-use DISTRO, SUITE build-args where poss… (#403)
[master] Dockerfiles: re-use DISTRO, SUITE build-args where possible
2019-10-28 18:15:38 -07:00
Eli Uriegas 7d1f550310
Merge pull request #404 from seemethere/aufs_amd64
deb: Only recommend aufs-tools on amd64
2019-10-28 13:34:54 -07:00
Eli Uriegas 3ed5f77860
deb: Only recommend aufs-tools on amd64
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-10-25 18:28:34 +00:00
Zuhayr Elahi 6dfaf9cc43 [TAR-1162][ce-nightly] Backport changes for adding verify script (#435)
* * Verification scripts for rpm
* Verification scripts for deb
* Integrated verify step in release-packaging Jenkinsfile

Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>

* Merge pull request #439 from seemethere/remove_f31

[ce-19.03] ci: Remove fedora 31 arm64

* Revert "Merge pull request #439 from seemethere/remove_f31"

This reverts commit 700e7a6b75938d96ab587b889077ec6a3dec9963, reversing
changes made to caa1930f1f60c52afccd1ff06882c6e7c2200440.

* [ce-19.03] ci: Re-add saveS3 (#437)

[ce-19.03] ci: Re-add saveS3
2019-10-21 13:49:33 -07:00
Sebastiaan van Stijn a996681f8e
Dockerfiles: re-use DISTRO, SUITE build-args where possible
Re-use these build-args, so that there's only one place to set them per Dockerfile.

To verify this change:

Check if the env-vars are set on the image:

```bash
make UBUNTU_VERSIONS=ubuntu-bionic DEBIAN_VERSIONS="" RASPBIAN_VERSIONS="" CLI_DIR=$GOPATH/src/github.com/docker/cli ENGINE_DIR=$GOPATH/src/github.com/docker/docker deb

docker image inspect debbuild-ubuntu-bionic/x86_64 --format '{{json .Config.Env }}' | jq .
```

Which should output something like;

```json
[
  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin:/go/bin",
  "GOPROXY=direct",
  "GO111MODULE=off",
  "GOPATH=/go",
  "DOCKER_BUILDTAGS=apparmor seccomp selinux",
  "RUNC_BUILDTAGS=apparmor seccomp selinux",
  "DISTRO=ubuntu",
  "SUITE=bionic"
]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-21 00:09:45 +02:00
Eli Uriegas 99752aaab4
[master] deb: make init and postinst files executable (#402)
[master] deb: make init and postinst files executable
2019-10-20 14:51:11 -07:00
Eli Uriegas b49f9d4bb8
[master] deb: make "rules" executable (#401)
[master] deb: make "rules" executable
2019-10-20 14:50:59 -07:00
Eli Uriegas 8c6f673d3f
[master] add Ubuntu 19.10 "eoan" (#399)
[master] add Ubuntu 19.10 "eoan"
2019-10-20 14:50:37 -07:00
Sebastiaan van Stijn 1ccafdb8ca
deb: make init and postinst files executable
was not entirely sure if this was needed, but given
that they are scripts, I assume they should be executable

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 18:09:49 +02:00
Sebastiaan van Stijn 7ef5012e6b
deb: make "rules" executable
```
dpkg-buildpackage: info: source package docker-ce
dpkg-buildpackage: info: source version 5:0.0.0-20191018214002-79aa6cce-0~ubuntu-bionic
dpkg-buildpackage: info: source distribution bionic
dpkg-buildpackage: info: source changed by Docker <support@docker.com>
dpkg-buildpackage: warning: debian/rules is not executable; fixing that
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 18:06:14 +02:00
Sebastiaan van Stijn ccc2ee3812
Add Ubuntu 19.10 "eoan"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 17:58:57 +02:00
Sebastiaan van Stijn f9eab1b87b
Update Golang 1.12.12 (CVE-2019-17596)
Golang 1.12.12
-------------------------------

go1.12.12 (released 2019/10/17) includes fixes to the go command, runtime,
syscall and net packages. See the Go 1.12.12 milestone on our issue tracker for
details.

https://github.com/golang/go/issues?q=milestone%3AGo1.12.12

Golang 1.12.11 (CVE-2019-17596)
-------------------------------

go1.12.11 (released 2019/10/17) includes security fixes to the crypto/dsa
package. See the Go 1.12.11 milestone on our issue tracker for details.
https://github.com/golang/go/issues?q=milestone%3AGo1.12.11

[security] Go 1.13.2 and Go 1.12.11 are released

Hi gophers,

We have just released Go 1.13.2 and Go 1.12.11 to address a recently reported
security issue. We recommend that all affected users update to one of these
releases (if you're not sure which, choose Go 1.13.2).

Invalid DSA public keys can cause a panic in dsa.Verify. In particular, using
crypto/x509.Verify on a crafted X.509 certificate chain can lead to a panic,
even if the certificates don't chain to a trusted root. The chain can be
delivered via a crypto/tls connection to a client, or to a server that accepts
and verifies client certificates. net/http clients can be made to crash by an
HTTPS server, while net/http servers that accept client certificates will
recover the panic and are unaffected.

Moreover, an application might crash invoking
crypto/x509.(*CertificateRequest).CheckSignature on an X.509 certificate
request, parsing a golang.org/x/crypto/openpgp Entity, or during a
golang.org/x/crypto/otr conversation. Finally, a golang.org/x/crypto/ssh client
can panic due to a malformed host key, while a server could panic if either
PublicKeyCallback accepts a malformed public key, or if IsUserAuthority accepts
a certificate with a malformed public key.

The issue is CVE-2019-17596 and Go issue golang.org/issue/34960.

Thanks to Daniel Mandragona for discovering and reporting this issue. We'd also
like to thank regilero for a previous disclosure of CVE-2019-16276.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-20 17:52:07 +02:00
Dmitry Makovey ce87ec1b3e
Merge pull request #397 from daixiang0/master
fixed erroneous use of "-eq" operator
2019-10-17 08:21:46 -06:00
Xiang Dai bfec9e6e02 fix eq issue
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-10-17 10:24:15 +08:00
Eli Uriegas cfe6e5a65a
Update packages list (#395)
Update packages list
2019-10-16 11:32:54 -07:00
Eli Uriegas 6c1f016b12
Merge branch 'master' into update-readme 2019-10-16 11:04:37 -07:00
docker-unir[bot] 069ea9c960
Merge pull request #396 from zelahi/go_modules_off
Merged with https://github.com/seemethere/unir
2019-10-15 23:00:20 +00:00
Zuhayr Elahi c1a42f9f31
Re-order common env variables
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
2019-10-15 14:55:50 -07:00
Zuhayr Elahi 1b52d15867
ADDED gomodules=off to docker-ce-packaging files
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
2019-10-15 14:46:31 -07:00
Eli Uriegas 416672540b
Merge pull request #394 from andrewhsu/rm28
remove fedora 28 because it is eol
2019-10-15 11:07:51 -07:00
Jintao Zhang fedbde9842 Update packages list
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-10-10 18:03:12 +08:00
Andrew Hsu 235feeca78 remove fedora 28 because it is eol
End of life as of 2019-05-28: https://fedoramagazine.org/fedora-28-end-of-life/

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-10-10 00:02:57 +00:00
Eli Uriegas 4f26329b61
plugins: remove (now) redundant .gitkeep (#390)
plugins: remove (now) redundant .gitkeep
2019-09-30 08:14:13 -07:00
Sebastiaan van Stijn 689992da0b
plugins: remove (now) redundant .gitkeep
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-28 13:05:51 +02:00
docker-unir[bot] 1a246e9444
Merge pull request #387 from tiborvass/buildx-update
Merged with https://github.com/seemethere/unir
2019-09-27 22:15:36 +00:00
Tibor Vass 41dfc516cd plugins: pin buildx to v0.3.1
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-09-27 18:05:30 +00:00
Andrew Hsu e47f4337a3
Merge pull request #385 from thaJeztah/bump_golang_1.12.10
bump golang 1.12.10 (CVE-2019-16276)
2019-09-27 10:18:58 -07:00
Sebastiaan van Stijn 7847c12a44
bump golang 1.12.10 (CVE-2019-16276)
full diff: https://github.com/golang/go/compare/go1.12.9...go1.12.10

```
Hi gophers,

We have just released Go 1.13.1 and Go 1.12.10 to address a recently reported security issue. We recommend that all affected users update to one of these releases (if you're not sure which, choose Go 1.13.1).

net/http (through net/textproto) used to accept and normalize invalid HTTP/1.1 headers with a space before the colon, in violation of RFC 7230. If a Go server is used behind an uncommon reverse proxy that accepts and forwards but doesn't normalize such invalid headers, the reverse proxy and the server can interpret the headers differently. This can lead to filter bypasses or request smuggling, the latter if requests from separate clients are multiplexed onto the same upstream connection by the proxy. Such invalid headers are now rejected by Go servers, and passed without normalization to Go client applications.

The issue is CVE-2019-16276 and Go issue golang.org/issue/34540.

Thanks to Andrew Stucki, Adam Scarr (99designs.com), and Jan Masarik (masarik.sh) for discovering and reporting this issue.

Downloads are available at https://golang.org/dl for all supported platforms.

Alla prossima,
Filippo on behalf of the Go team
```

From the patch: 6e6f4aaf70

```
net/textproto: don't normalize headers with spaces before the colon

RFC 7230 is clear about headers with a space before the colon, like

X-Answer : 42

being invalid, but we've been accepting and normalizing them for compatibility
purposes since CL 5690059 in 2012.

On the client side, this is harmless and indeed most browsers behave the same
to this day. On the server side, this becomes a security issue when the
behavior doesn't match that of a reverse proxy sitting in front of the server.

For example, if a WAF accepts them without normalizing them, it might be
possible to bypass its filters, because the Go server would interpret the
header differently. Worse, if the reverse proxy coalesces requests onto a
single HTTP/1.1 connection to a Go server, the understanding of the request
boundaries can get out of sync between them, allowing an attacker to tack an
arbitrary method and path onto a request by other clients, including
authentication headers unknown to the attacker.

This was recently presented at multiple security conferences:
https://portswigger.net/blog/http-desync-attacks-request-smuggling-reborn

net/http servers already reject header keys with invalid characters.
Simply stop normalizing extra spaces in net/textproto, let it return them
unchanged like it does for other invalid headers, and let net/http enforce
RFC 7230, which is HTTP specific. This loses us normalization on the client
side, but there's no right answer on the client side anyway, and hiding the
issue sounds worse than letting the application decide.
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-27 17:15:22 +02:00
docker-unir[bot] 9ef9298d62
Merge pull request #383 from zelahi/plugins-hard-link
Merged with https://github.com/seemethere/unir
2019-09-26 14:41:43 +00:00
Zuhayr Elahi c5b1aa8457
realpath for plugins directory
Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
2019-09-25 14:44:36 -07:00
Eli Uriegas 940a2973c7
RPM spec: remove -ce suffix from distribution_based_engine JSON (#378)
RPM spec: remove -ce suffix from distribution_based_engine JSON
2019-09-25 08:47:31 -07:00
Andrew Hsu 10eacb4591
Merge pull request #381 from thaJeztah/buildx_0.3.0
Pin buildx plugin to v0.3.0, and allow overriding
2019-09-24 17:40:54 -07:00
Sebastiaan van Stijn ffee8a345b
Pin buildx plugin to v0.3.0, and allow overriding
Commit 9a5aabdaff removed the fixed
version for this plugin, and changed it to install from "master",
which made the build non-reproducible.

This patch pins the plugin to a specific tag/release again, but allow
overriding by setting the `BUILDX_COMMIT` env-var.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-24 13:27:37 +02:00
docker-unir[bot] 90265a754d
Merge pull request #377 from tao12345666333/bump-go-1.12.9
Merged with https://github.com/seemethere/unir
2019-09-23 17:21:44 +00:00
Sebastiaan van Stijn 77878ffa48
RPM spec: remove -ce suffix from distribution_based_engine JSON
Noticed this failing in internal e2e tests on CentOS:

```
sudo docker engine activate --license /tmp/docker.lic
unable to determine the installed engine version. Specify which engine image to update with --engine-image: open /var/lib/docker-engine/distribution_based_engine.json: no such file or directory
```

Looks lik 09b3ac888d changed the name of this
file from `distribution_based_engine-ce.json` to `distribution_based_engine.json`
(without `-ce` suffix) for the `.deb` packages, but did not update
the RPM packages accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-10 14:49:32 +02:00
Tianon Gravi e258ed2001 Add LICENSE (copy of docker/docker's Apache-2.0 file)
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2019-09-05 08:14:27 -07:00
Jintao Zhang cc3b9fb951 Bump Golang 1.12.9
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-08-17 09:23:52 +08:00
Eli Uriegas 16b78bef69
Dockerfiles: remove unused GO_VERSION (#374)
Dockerfiles: remove unused GO_VERSION
2019-08-15 14:47:04 -07:00
Eli Uriegas d04287fb61
Makefile: use an include file for common variables (#375)
Makefile: use an include file for common variables
2019-08-15 14:46:36 -07:00
Sebastiaan van Stijn 2929c9b1e8
Makefile: realpath engine-, cli-dir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-15 00:22:07 +02:00
Sebastiaan van Stijn fe23576b64
Makefile: use include for common variables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 23:48:38 +02:00
Sebastiaan van Stijn 3b8cc28c3f
Makefile: set STATIC_VERSION only if empty
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 23:27:03 +02:00
Sebastiaan van Stijn 23508567bb
Dockerfiles: remove unused GO_VERSION
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 22:55:56 +02:00
Andrew Hsu 6a383e6941
Merge pull request #370 from thaJeztah/bump_golang_1.12.8
Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)
2019-08-14 12:20:41 -07:00
Sebastiaan van Stijn 9f5da37431
Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)
go1.12.8 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.12.8 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.8

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 03:13:24 +02:00
Eli Uriegas aab70bec65
Pin Golang images to debian stretch variant (#369)
Pin Golang images to debian stretch variant
2019-08-06 15:17:56 -07:00
Sebastiaan van Stijn 1310e3974e
Pin Golang images to debian stretch variant
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-06 23:35:25 +02:00
Eli Uriegas 356c85b801
FIX pathing issue with cli dir (#368)
FIX pathing issue with cli dir
2019-07-25 16:02:17 -10:00
zelahi 0df1091054
FIX pathing issue with cli dir 2019-07-25 17:27:14 -07:00
Eli Uriegas fa4ab312e6
Merge pull request #366 from zelahi/fix-go-version
FIXED retrieving GO_VERSION from the CLI dir
2019-07-25 12:07:04 -10:00
zelahi 5f1afbb139
FIXED retrieving GO_VERSION from the CLI dir
Signed-off-by: zelahi <elahi.zuhayr@gmail.com>
2019-07-25 14:38:33 -07:00
Eli Uriegas 6fd5510572
Bump Golang 1.12.6 (#363)
Bump Golang 1.12.6
2019-07-09 12:39:58 -10:00
Sebastiaan van Stijn 01ba39e597
Bump Golang 1.12.6
go1.12.6 (released 2019/06/11) includes fixes to the compiler, the linker,
the go command, and the `crypto/x509`, `net/http`, and `os` packages. See
the Go 1.12.6 milestone on our issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.12.6

full diff: https://github.com/golang/go/compare/go1.12.5...go1.12.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-08 11:17:54 +02:00
Eli Uriegas 24c9085363
Assorted improvements to Makefiles (#357)
Assorted improvements to Makefiles
2019-07-06 07:42:59 -10:00
Kir Kolyshkin 8ac858c666 Makefile: rely on targets in deb/rpm
Instead of dynamically getting list of distros to build for,
rely on the corresponding targets in sub-Makefiles. This also
ensures that deb/Makefile and rpm/Makefile will have up-to-date
list of distros included.

This also fixes the following bug:

> $ make deb
> for p in raspbian-stretch ubuntu-bionic ubuntu-disco ubuntu-xenial debbuild/ubuntu-disco ubuntu-cosmic debian-buster debian-stretch; do \
> ...

As you can see, `debbuild/ubuntu-disco` should not be included but it
is. Could be prevented by using `-maxdepth 1` argument to `find`.

While at it, amend the sub-Makefiles to print out the distro
that we build for.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-07-02 15:44:17 -07:00
Kir Kolyshkin 62a8258474 rpm/Makefile: simplify and fix
1. A symbol % is not working as expected in PHONY targets, so
e.g. fedora-30 was not being rebuild each time, because
fedora-30 directory exists. The fix is to explicitly mark
every fedora-NN target as phony.

2. Remove code duplication for making packages for different distros.

3. As a side effect, bash completion now lists all the distros
to be build.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-07-02 15:43:51 -07:00
Kir Kolyshkin c048fc8fd7 deb/Makefile: simplify and fix
1. A symbol % is not working as expected in PHONY targets, so
e.g. ubuntu-cosmic was not being rebuild each time, because
ubuntu-cosmic directory exists. The fix is to explicitly mark
every ubuntu-whatever target as phony.

2. Remove code duplication for making packages for different distros.

3. Add missing ubuntu (cosmic, disco) and debian (buster) to the
appropriate targets.

4. As a side effect, bash completion now lists all the distros
to be build.

5. Exclude raspbian from deb target as it can only be built on ARM.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-07-02 14:43:12 -07:00
Kir Kolyshkin 896b115b0b Jenkinsfile: use {rpm,deb}/Makefile directly
Instead of relying on the main Makefile to pass DOCKER_BUILD_PKGS as
an argument to {rpm,deb}/Makefile, use the sub-makefile directly.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-07-02 14:43:07 -07:00
Eli Uriegas 0eb8ff8c11
[master] Bump containerd.io dep >= 1.2.2-3 (CVE-2019-5736) (#353)
[master] Bump containerd.io dep >= 1.2.2-3 (CVE-2019-5736)
2019-07-02 06:17:49 -10:00
Eli Uriegas 49c3626301
TAR-875 Fix man-pages showing "minimized" message (alternative) (#350)
TAR-875 Fix man-pages showing "minimized" message (alternative)
2019-06-27 14:47:29 -10:00
Zuhayr Elahi 062428780d
Merge pull request #356 from ndanyluk/add-raspbian-buster
switched docker build image to balenalib/rpi-raspbian
2019-06-26 09:46:56 -07:00
Nick Danyluk 2e38922ed6 switched docker build image to balenalib/rpi-raspbian 2019-06-26 08:11:40 -04:00
Eli Uriegas 07dd5144c9
Merge pull request #349 from ndanyluk/add-raspbian-buster
Add Raspbian buster
2019-06-25 15:24:19 -10:00
Nick Danyluk e6445e38ed Fixed duplicates of ubuntu, debian, & raspbian 2019-06-25 20:57:25 -04:00
Nick Danyluk 2cbd93cf0d add raspbian buster 2019-06-25 20:57:24 -04:00
Sebastiaan van Stijn e52fa49844
TAR-875 Fix man-pages showing "minimized" message
The dh_installman script calls "man" and captures its output to convert manpages
to utf8:

8523120dcc/dh_installman (L298-L316)

however, on minimized Ubuntu systems, man is overridden by a script that outputs
a warning message ("This  system  has been minimized by removing packages and
content ..").

As a result, all man-pages were be overwritten by that message.

This patch restores the actual `man` command before building to
work around this issue.

addresses docker/for-linux#639

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-26 01:26:08 +02:00
Eli Uriegas d18edc7155
Bump containerd.io dep >= 1.2.2-3 (CVE-2019-5736)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
(cherry picked from commit 06b649e2b0)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-26 00:53:32 +02:00
docker-unir[bot] 869ccdc8dd
Merge pull request #345 from thaJeztah/bump_container_selinux
Merged with https://github.com/seemethere/unir
2019-06-25 22:42:16 +00:00
Eli Uriegas 1583b53e6f
Merge pull request #344 from zelahi/add-fedora-31
[TAR-849] ADDED Dockerfile for fedora-31
2019-06-25 09:59:32 -10:00
Eli Uriegas 3b7b23dfcc
Merge pull request #347 from thaJeztah/sync_with_ee
Sync RPM Spec with downstream EE packaging
2019-06-25 09:39:58 -10:00
Sebastiaan van Stijn bece037752
Remove the pre and posttrans, they weren't useful
On some distros we were encountering errors where `$1` was not being populated
for the 'pre' and 'posttrans' rpm macros, upon closer inspection it
isn't exactly clear why the pre and posttrans macro scripts were exactly
useful since the `%systemd_postun_with_restart` does exactly what those
scripts were doing.

I've tidied up the systemd macros to use `docker.service` instead of
`docker` which seems to function as we'd expect.

taken from downstream commit 62d8413b550659a0b5318346ee2e3d7e4a50bfe1

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-25 12:21:04 +02:00
Sebastiaan van Stijn ffcd2256e4
Sync RPM Spec with EE
- systemd-units -> systemd (taken from 8bb1f0a7a395dfd979cd410b26ef47e55433de32)
- some wording changes (taken from a8c522a7c22c34dc354e91941377a4aadc3ddc4c)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-25 12:16:46 +02:00
Sebastiaan van Stijn a246b19b07
require container-selinux >= 2.74
version 2.9 is really old; this sets the same minimal version
as is used for the containerd.io package

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-06-25 11:41:04 +02:00
zelahi 161876db49
ADDED Dockerfile for fedora-31 2019-06-20 16:12:37 -07:00
Eli Uriegas a12c206083
Bump docker-app to v0.8.0 (#342)
Bump docker-app to v0.8.0
2019-06-17 10:38:03 -07:00
Silvin Lubecki 1fe2771095 Bump docker-app to v0.8.0
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-06-11 18:20:56 +02:00
Eli Uriegas eab462e82b
Bump Go 1.12.5 (#337)
Bump Go 1.12.5
2019-05-30 11:41:12 -07:00
Sebastiaan van Stijn 0abbdec692
Bump Go 1.12.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-27 23:15:25 +03:00
docker-unir[bot] afa3978544
Merge pull request #333 from tiborvass/buildx
Merged with https://github.com/seemethere/unir
2019-05-23 21:15:55 +00:00
Tibor Vass f30b97a0ca make buildx experimental in Docker CE
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-05-23 21:00:44 +00:00
Eli Uriegas dece27aece
[master] add thaJeztah to unir (#330)
[master] add thaJeztah to unir
2019-05-23 10:15:44 -05:00
Philipp Homann 2ed9ebd926
rpm lacks dependency to groupadd 2019-05-23 08:28:20 +02:00
Andrew Hsu 7e8498ab6f add thaJeztah to unir
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-05-14 05:34:55 +00:00
Andrew Hsu 84e4b451e0
Merge pull request #328 from seemethere/cleanup
Removed some unused files, no longer necessary
2019-05-09 17:22:10 -07:00
Eli Uriegas 701500fafc Removed some unused files, no longer necessary
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-05-07 22:56:01 +00:00
Eli Uriegas e477a69e65
Merge pull request #327 from silvin-lubecki/docker-app-v0.8.0-beta2
Bump docker app to v0.8.0-beta2
2019-04-26 08:40:43 -07:00
Silvin Lubecki 5134bad09f Bump docker app to v0.8.0-beta2
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
2019-04-26 14:27:17 +02:00
Eli Uriegas 639cbd2bad
[master] get the latest buildx from master branch (#326)
[master] get the latest buildx from master branch
2019-04-25 19:44:02 -07:00
Andrew Hsu 9a5aabdaff get the latest buildx from master branch
For the freshest of the fresh new hotness.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-04-26 02:23:56 +00:00
Andrew Hsu 60c13af3bd
Merge pull request #325 from seemethere/buildx
[TAR-698] Add buildx as a plugin we build
2019-04-25 18:49:53 -07:00
Eli Uriegas b4c83e7624 Add buildx as a plugin we build
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2019-04-25 22:52:17 +00:00
80 changed files with 2686 additions and 1696 deletions

30
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,30 @@
<!--
Please make sure you've read and understood our contributing guidelines;
https://github.com/docker/cli/blob/master/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
For additional information on our contributing process, read our contributing
guide https://docs.docker.com/opensource/code/
If this is a bug fix, make sure your description includes "fixes #xxxx", or
"closes #xxxx"
Please provide the following information:
-->
**- What I did**
**- Description for the changelog**
<!--
Write a short (one line) summary that describes the changes in this
pull request for inclusion in the changelog.
It must be placed inside the below triple backticks section.
NOTE: Only fill this section if changes introduced in this PR are user-facing.
The PR must have a relevant impact/ label.
-->
```markdown changelog
```

58
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: ci
# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- 'master'
- '[0-9]+.[0-9]{2}'
tags:
- 'v*'
pull_request:
jobs:
generate-matrix:
runs-on: ubuntu-24.04
outputs:
targets: ${{ steps.get-targets.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get targets
id: get-targets
run: |
echo "targets=$(jq -c '[to_entries[] | .key as $distro | .value.arches[] | {distro: $distro, arch: .}]' distros.json)" >> $GITHUB_OUTPUT
build:
needs:
- generate-matrix
runs-on: ${{ matrix.target.arch != 'amd64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
timeout-minutes: 60 # guardrails timeout for the whole job
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.generate-matrix.outputs.targets) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
run: |
make ARCH=${{ matrix.target.arch }} ${{ matrix.target.distro }}

4
.gitignore vendored
View File

@ -1,8 +1,6 @@
build
debbuild
rpmbuild
tmp
artifacts
sources
src
*.tar
image-linux*

View File

@ -1,9 +1,10 @@
# The list of people who can trigger an auto-merge with approvals
whitelist:
- seemethere
- andrewhsu
- jose-bigio
- corbin-coleman
- andrewhsu
- silvin-lubecki
- StefanScherer
- thaJeztah
- zelahi
# At least 2 approvals are needed for auto-merging
approvals_needed: 2

185
Jenkinsfile vendored
View File

@ -1,72 +1,131 @@
#!groovy
def genBranch(String arch) {
return [
"${arch}": { ->
stage("Build engine image on ${arch}") {
wrappedNode(label: "linux&&${arch}", cleanWorkspace: true) {
try {
checkout scm
sh("git clone https://github.com/docker/engine.git engine")
sh('make ENGINE_DIR=$(pwd)/engine image')
} finally {
sh('make ENGINE_DIR=$(pwd)/engine clean-image clean-engine')
}
}
}
}]
}
def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME
test_steps = [
'deb': { ->
stage('Ubuntu Xenial Debian Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli deb')
}
}
},
'rpm': { ->
stage('Centos 7 RPM Package') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=centos-7 ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli rpm')
}
}
},
'static': { ->
stage('Static Linux Binaries') {
wrappedNode(label: 'ubuntu && x86_64', cleanWorkspace: true) {
checkout scm
sh('git clone https://github.com/docker/cli.git')
sh("git -C cli checkout $branch")
sh('git clone https://github.com/docker/engine.git')
sh("git -C engine checkout $branch")
sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=static-linux ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli static')
}
}
},
def pkgs = [
[target: "centos-9", image: "quay.io/centos/centos:stream9", arches: ["amd64", "aarch64"]],
[target: "centos-10", image: "quay.io/centos/centos:stream10", arches: ["amd64", "aarch64"]], // CentOS Stream 10 (EOL: 2030)
[target: "debian-bullseye", image: "debian:bullseye", arches: ["amd64", "aarch64", "armhf"]], // Debian 11 (oldstable, EOL: 2024-08-14, EOL (LTS): 2026-08-31)
[target: "debian-bookworm", image: "debian:bookworm", arches: ["amd64", "aarch64", "armhf"]], // Debian 12 (stable, EOL: 2026-06-10, EOL (LTS): 2028-06-30)
[target: "debian-trixie", image: "debian:trixie", arches: ["amd64", "aarch64", "armhf"]], // Debian 13 (testing)
[target: "fedora-41", image: "fedora:41", arches: ["amd64", "aarch64"]], // EOL: November 19, 2025
[target: "fedora-42", image: "fedora:42", arches: ["amd64", "aarch64"]], // EOL: May 13, 2026
[target: "raspbian-bullseye", image: "balenalib/rpi-raspbian:bullseye", arches: ["armhf"]], // Debian/Raspbian 11 (stable)
[target: "raspbian-bookworm", image: "balenalib/rpi-raspbian:bookworm", arches: ["armhf"]], // Debian/Raspbian 12 (next stable)
[target: "ubuntu-jammy", image: "ubuntu:jammy", arches: ["amd64", "aarch64", "armhf"]], // Ubuntu 22.04 LTS (End of support: June, 2027. EOL: April, 2032)
[target: "ubuntu-noble", image: "ubuntu:noble", arches: ["amd64", "aarch64", "armhf"]], // Ubuntu 24.04 LTS (End of support: June, 2029. EOL: April, 2034)
[target: "ubuntu-oracular", image: "ubuntu:oracular", arches: ["amd64", "aarch64", "armhf"]], // Ubuntu 24.10 (EOL: July, 2025)
[target: "ubuntu-plucky", image: "ubuntu:plucky", arches: ["amd64", "aarch64", "armhf"]], // Ubuntu 25.04 (EOL: January, 2026)
]
arches = [
"x86_64",
"aarch64",
"armhf"
]
def genBuildStep(LinkedHashMap pkg, String arch) {
def nodeLabel = "linux&&${arch}"
def platform = ""
def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME
arches.each {
test_steps << genBranch(it)
if (arch == 'armhf') {
// Running armhf builds on EC2 requires --platform parameter
// Otherwise it accidentally pulls armel images which then breaks the verify step
platform = "--platform=linux/${arch}"
nodeLabel = "${nodeLabel}&&ubuntu"
} else {
nodeLabel = "${nodeLabel}&&ubuntu-2204"
}
return { ->
wrappedNode(label: nodeLabel, cleanWorkspace: true) {
stage("${pkg.target}-${arch}") {
// This is just a "dummy" stage to make the distro/arch visible
// in Jenkins' BlueOcean view, which truncates names....
sh 'echo starting...'
}
stage("info") {
sh 'docker version'
sh 'docker info'
}
stage("build") {
checkout scm
sh "make clean"
sh "make REF=$branch ARCH=${arch} ${pkg.target}"
}
stage("verify") {
sh "make IMAGE=${pkg.image} ARCH=${arch} verify"
}
}
}
}
parallel(test_steps)
def build_package_steps = [
'static-linux': { ->
wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) {
stage("static-linux") {
// This is just a "dummy" stage to make the distro/arch visible
// in Jenkins' BlueOcean view, which truncates names....
sh 'echo starting...'
}
stage("info") {
sh 'docker version'
sh 'docker info'
}
stage("build") {
try {
checkout scm
sh "make REF=$branch DOCKER_BUILD_PKGS='static-linux' static"
} finally {
sh "make clean"
}
}
}
},
'cross-mac': { ->
wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) {
stage("cross-mac") {
// This is just a "dummy" stage to make the distro/arch visible
// in Jenkins' BlueOcean view, which truncates names....
sh 'echo starting...'
}
stage("info") {
sh 'docker version'
sh 'docker info'
}
stage("build") {
try {
checkout scm
sh "make REF=$branch DOCKER_BUILD_PKGS='cross-mac' static"
} finally {
sh "make clean"
}
}
}
},
'cross-win': { ->
wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) {
stage("cross-win") {
// This is just a "dummy" stage to make the distro/arch visible
// in Jenkins' BlueOcean view, which truncates names....
sh 'echo starting...'
}
stage("info") {
sh 'docker version'
sh 'docker info'
}
stage("build") {
try {
checkout scm
sh "make REF=$branch DOCKER_BUILD_PKGS='cross-win' static"
} finally {
sh "make clean"
}
}
}
},
]
def genPackageSteps(opts) {
return opts.arches.collectEntries {
["${opts.image}-${it}": genBuildStep(opts, it)]
}
}
build_package_steps << pkgs.collectEntries { genPackageSteps(it) }
parallel(build_package_steps)

191
LICENSE Normal file
View File

@ -0,0 +1,191 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2013-2017 Docker, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

134
Makefile
View File

@ -1,17 +1,6 @@
SHELL:=/bin/bash
ENGINE_DIR:=$(CURDIR)/../engine
CLI_DIR:=$(CURDIR)/../cli
VERSION?=0.0.0-dev
DOCKER_GITCOMMIT:=abcdefg
ARCH=$(shell uname -m)
STATIC_VERSION=$(shell static/gen-static-ver $(ENGINE_DIR) $(VERSION))
GO_VERSION:=1.12.4
DEFAULT_PRODUCT_LICENSE:=Community Engine
PLATFORM=Docker Engine - Community
BUILDTIME=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
export DEFAULT_PRODUCT_LICENSE
export PLATFORM
export BUILDTIME
include common.mk
STATIC_VERSION=$(shell static/gen-static-ver $(realpath $(CURDIR)/src/github.com/docker/docker) $(VERSION))
# Taken from: https://www.cmcrossroads.com/article/printing-value-makefile-variable
print-% : ; @echo $($*)
@ -20,53 +9,100 @@ print-% : ; @echo $($*)
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: clean-engine
clean-engine:
rm -rf $(ENGINE_DIR)
.PHONY: clean-src
clean-src:
[ ! -d src ] || $(CHOWN) -R $(shell id -u):$(shell id -g) src
$(RM) -r src
.PHONY: clean-image
clean-image:
$(MAKE) ENGINE_DIR=$(ENGINE_DIR) -C image clean
.PHONY: src
src: src/github.com/docker/cli src/github.com/docker/docker src/github.com/docker/buildx src/github.com/docker/compose src/github.com/docker/model-cli ## clone source
ifdef CLI_DIR
src/github.com/docker/cli:
mkdir -p "$(@D)"
cp -r "$(CLI_DIR)" $@
else
src/github.com/docker/cli:
git init $@
git -C $@ remote add origin "$(DOCKER_CLI_REPO)"
endif
ifdef ENGINE_DIR
src/github.com/docker/docker:
mkdir -p "$(@D)"
cp -r "$(ENGINE_DIR)" $@
else
src/github.com/docker/docker:
git init $@
git -C $@ remote add origin "$(DOCKER_ENGINE_REPO)"
endif
src/github.com/docker/buildx:
git init $@
git -C $@ remote add origin "$(DOCKER_BUILDX_REPO)"
src/github.com/docker/compose:
git init $@
git -C $@ remote add origin "$(DOCKER_COMPOSE_REPO)"
src/github.com/docker/model-cli:
git init $@
git -C $@ remote add origin "$(DOCKER_MODEL_REPO)"
.PHONY: checkout-cli
checkout-cli: src/github.com/docker/cli
./scripts/checkout.sh src/github.com/docker/cli "$(DOCKER_CLI_REF)"
.PHONY: checkout-docker
checkout-docker: src/github.com/docker/docker
./scripts/checkout.sh src/github.com/docker/docker "$(DOCKER_ENGINE_REF)"
.PHONY: checkout-buildx
checkout-buildx: src/github.com/docker/buildx
./scripts/checkout.sh src/github.com/docker/buildx "$(DOCKER_BUILDX_REF)"
.PHONY: checkout-compose
checkout-compose: src/github.com/docker/compose
./scripts/checkout.sh src/github.com/docker/compose "$(DOCKER_COMPOSE_REF)"
.PHONY: checkout-model
checkout-model: src/github.com/docker/model-cli
./scripts/checkout.sh src/github.com/docker/model-cli "$(DOCKER_MODEL_REF)"
.PHONY: checkout
checkout: checkout-cli checkout-docker checkout-buildx checkout-compose checkout-model ## checkout source at the given reference(s)
.PHONY: clean
clean: clean-image ## remove build artifacts
clean: clean-src ## remove build artifacts
$(MAKE) -C rpm clean
$(MAKE) -C deb clean
$(MAKE) -C static clean
.PHONY: rpm
rpm: DOCKER_BUILD_PKGS:=$(shell find rpm -type d | grep ".*-.*" | sed 's/^rpm\///')
rpm: ## build rpm packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
done
.PHONY: deb rpm
deb rpm: checkout ## build rpm/deb packages
$(MAKE) -C $@ VERSION=$(VERSION) GO_VERSION=$(GO_VERSION) $@
.PHONY: deb
deb: DOCKER_BUILD_PKGS:=$(shell find deb -type d | grep ".*-.*" | sed 's/^deb\///')
deb: ## build deb packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
done
.PHONY: centos-% fedora-% rhel-%
centos-% fedora-% rhel-%: checkout ## build rpm packages for the specified distro
$(MAKE) -C rpm VERSION=$(VERSION) GO_VERSION=$(GO_VERSION) $@
.PHONY: debian-% raspbian-% ubuntu-%
debian-% raspbian-% ubuntu-%: checkout ## build deb packages for the specified distro
$(MAKE) -C deb VERSION=$(VERSION) GO_VERSION=$(GO_VERSION) $@
.PHONY: static
static: DOCKER_BUILD_PKGS:=static-linux cross-mac cross-win cross-arm
static: ## build static-compiled packages
static: checkout ## build static-compiled packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
$(MAKE) -C $@ VERSION=$(VERSION) GO_VERSION=$(GO_VERSION) TARGETPLATFORM=$(TARGETPLATFORM) CONTAINERD_VERSION=$(CONTAINERD_VERSION) RUNC_VERSION=$(RUNC_VERSION) $${p}; \
done
# TODO - figure out multi-arch
.PHONY: image
image: DOCKER_BUILD_PKGS:=image-linux
image: ## build static-compiled packages
for p in $(DOCKER_BUILD_PKGS); do \
$(MAKE) -C $@ VERSION=$(VERSION) ENGINE_DIR=$(ENGINE_DIR) CLI_DIR=$(CLI_DIR) GO_VERSION=$(GO_VERSION) $${p}; \
done
engine-$(ARCH).tar:
$(MAKE) -C image $@
.PHONY: release
release:
$(MAKE) -C image $@
.PHONY: verify
verify: ## verify installation of packages
# to verify using packages from staging, use: make VERIFY_PACKAGE_REPO=stage IMAGE=ubuntu:noble verify
docker run $(VERIFY_PLATFORM) --rm -i \
-v "$$(pwd):/v" \
-e DEBIAN_FRONTEND=noninteractive \
-e PACKAGE_REPO=$(VERIFY_PACKAGE_REPO) \
-w /v \
$(IMAGE) ./verify

View File

@ -1,17 +1,16 @@
# Docker CE Packaging
This repo contains the open source scripts for packaging
[Docker CE products](https://store.docker.com/search?offering=community&q=&type=edition).
This repo contains the open source scripts for packaging the
[Docker Engine](https://docs.docker.com/engine/), the Docker CLI, CLI plugins,
and rootless-extras packages.
This repository is solely maintained by Docker, Inc.
The repository contains Dockerfiles to build packages for various distributions,
which can be found in the "rpm" and "deb" subdirectories, as well as scripts to
build static binaries.
The scripts will build for this list of packages types:
* DEB packages for Ubuntu 18.04 Bionic
* DEB packages for Ubuntu 16.04 Xenial
* DEB packages for Debian 10 Buster
* DEB packages for Debian 9 Stretch
* RPM packages for Fedora 28
* RPM packages for Fedora 27
* RPM packages for CentOS 7
* TGZ and ZIP files with static binaries
Docker uses these recipes to build and release packages that are available on the
https://download.docker.com package repositories. We welcome contributions to
this repository, including the addition of new distros or distro-versions. Note,
however, that Docker makes a subselection of distros and architectures for release,
and not all distros available in this repository may be released to download.docker.com,
but you can use these scripts to build your own packages.

62
common.mk Normal file
View File

@ -0,0 +1,62 @@
ARCH=$(shell uname -m)
# These are the architecture formats as used in release-packaging Jenkinsfile
# This is an ugly chimera, nobody uses this combination of dpkg and uname formats
# Why don't we pick one format and stick with it? Because at the time of writing
# it was deemed too risky/involving too many changes across repos to change architecture
# formats in release-packaging Jenkinsfile. But someone please do it.
# Why do we need to list this here? Because I haven't been able to figure out how
# to do Makefile rules with multiple patterns. (See how it's used in {deb,rpm}/Makefile)
# Adding new architectures or changing the format in release-packaging will prevent make
# from finding the corresponding rule unless this list is updated.
# Or Jenkinsfiles/Makefiles removed (🎵 Gotta have faith-a-faith-a-faith... 🎵)
ARCHES:=amd64 aarch64 armhf armel s390x ppc64le
BUILDTIME=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
DEFAULT_PRODUCT_LICENSE:=Community Engine
PACKAGER_NAME?=
DOCKER_GITCOMMIT:=abcdefg
GO_VERSION:=1.24.6
PLATFORM=Docker Engine - Community
SHELL:=/bin/bash
VERSION?=0.0.1-dev
# DOCKER_CLI_REPO and DOCKER_ENGINE_REPO define the source repositories to clone
# the source from. These can be overridden to build from a fork.
DOCKER_CLI_REPO ?= https://github.com/docker/cli.git
DOCKER_ENGINE_REPO ?= https://github.com/docker/docker.git
DOCKER_COMPOSE_REPO ?= https://github.com/docker/compose.git
DOCKER_BUILDX_REPO ?= https://github.com/docker/buildx.git
DOCKER_MODEL_REPO ?= https://github.com/docker/model-cli.git
# REF can be used to specify the same branch or tag to use for *both* the CLI
# and Engine source code. This can be useful if both the CLI and Engine have a
# release branch with the same name (e.g. "19.03"), or of both repositories have
# tagged a release with the same version.
#
# For other situations, specify DOCKER_CLI_REF and/or DOCKER_ENGINE_REF separately.
REF ?= HEAD
DOCKER_CLI_REF ?= $(REF)
DOCKER_ENGINE_REF ?= $(REF)
# DOCKER_COMPOSE_REF is the version of compose to package. It usually is a tag,
# but can be a valid git reference in DOCKER_COMPOSE_REPO.
DOCKER_COMPOSE_REF ?= v2.39.2
# DOCKER_BUILDX_REF is the version of compose to package. It usually is a tag,
# but can be a valid git reference in DOCKER_BUILDX_REPO.
DOCKER_BUILDX_REF ?= v0.26.1
# DOCKER_MODEL_REF is the version of model to package. It is usually a tag,
# but can be a valid git reference in DOCKER_MODEL_REPO.
DOCKER_MODEL_REF ?= v0.1.36
# Use "stage" to install dependencies from download-stage.docker.com during the
# verify step. Leave empty or use any other value to install from download.docker.com
VERIFY_PACKAGE_REPO ?= prod
# Optional flags like --platform=linux/armhf
VERIFY_PLATFORM ?=
export BUILDTIME
export DEFAULT_PRODUCT_LICENSE
export PACKAGER_NAME
export PLATFORM

View File

@ -1,11 +0,0 @@
{
"image": "docker.io/${ENGINE_IMAGE}",
"imagePath": "/var/lib/docker-engine/engine.tar",
"namespace":"docker",
"args": [
"--containerd", "/run/containerd/containerd.sock",
"--default-runtime", "containerd",
"--add-runtime", "containerd=runc"
],
"scope": "${ENGINE_SCOPE}"
}

View File

@ -1,17 +0,0 @@
# Common things for containerd functionality
CONTAINERD_PROXY_COMMIT=35c543bd887878714213cf61ee14038499fd25b7
CONTAINERD_SHIM_PROCESS_IMAGE=docker.io/docker/containerd-shim-process:ff98a47
# If containerd is running use that socket instead
ifeq ("$(shell systemctl is-active containerd)", "active")
CONTAINERD_SOCK:=/var/run/containerd/containerd.sock
else
CONTAINERD_SOCK:=/var/run/docker/containerd/docker-containerd.sock
endif
CTR=docker run \
--rm -i \
-v $(CONTAINERD_SOCK):/ours/containerd.sock \
-v $(CURDIR)/artifacts:/artifacts \
docker:18.06.0-ce \
docker-containerd-ctr -a /ours/containerd.sock

View File

@ -1,44 +1,62 @@
include ../containerd.mk
include ../common.mk
SHELL:=/bin/bash
ARCH:=$(shell uname -m)
CLI_DIR:=$(CURDIR)/../../cli
ENGINE_DIR:=$(CURDIR)/../../engine
GITCOMMIT?=$(shell cd $(CLI_DIR) && git rev-parse --short HEAD)
VERSION?=0.0.0-dev
STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION))
PLUGINS_DIR=$(realpath $(CURDIR)/../plugins)
GO_BASE_IMAGE=golang
GO_VERSION:=1.12.4
GO_IMAGE=$(GO_BASE_IMAGE):$(GO_VERSION)
DEB_VERSION=$(shell ./gen-deb-ver $(CLI_DIR) "$(VERSION)")
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-bookworm
EPOCH?=5
GEN_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/cli) "$(VERSION)")
GEN_BUILDX_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/buildx) "$(DOCKER_BUILDX_REF)")
GEN_COMPOSE_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/compose) "$(DOCKER_COMPOSE_REF)")
GEN_MODEL_DEB_VER=$(shell ./gen-deb-ver $(realpath $(CURDIR)/../src/github.com/docker/model-cli) "$(DOCKER_MODEL_REF)")
CLI_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/cli) && git rev-parse --short HEAD)
ENGINE_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/docker) && git rev-parse --short HEAD)
BUILDX_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/buildx) && git rev-parse --short HEAD)
ifdef BUILD_IMAGE
BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
endif
COMMON_FILES=common
BUILD?=docker build \
BUILD?=DOCKER_BUILDKIT=1 \
docker build \
$(BUILD_IMAGE_FLAG) \
--build-arg GO_IMAGE=$(GO_IMAGE) \
--build-arg COMMON_FILES=$(COMMON_FILES) \
-t debbuild-$@/$(ARCH) \
-f $(CURDIR)/$@/Dockerfile .
--platform linux/$(ARCH) \
-f $@/Dockerfile \
.
# Additional flags may be necessary at some point
RUN_FLAGS=
RUN=docker run --rm -i \
-e EPOCH='$(EPOCH)' \
-e DEB_VERSION=$(word 1, $(DEB_VERSION)) \
-e VERSION=$(word 2, $(DEB_VERSION)) \
-e DOCKER_GITCOMMIT=$(GITCOMMIT) \
# FIXME(thaJeztah): disabling seccomp to handle (armhf) tar "chown / chmod" failing
# when running in a Ubuntu 24.04 container on a Ubuntu 20.04.6 host (kernel 5.15.0-1053-aws);
# see https://github.com/docker/docker-ce-packaging/pull/1006#issuecomment-2006878743
RUN?=docker run --rm \
--security-opt seccomp=unconfined \
--platform linux/$(ARCH) \
-e PLATFORM \
-e EPOCH='$(EPOCH)' \
-e DEB_VERSION=$(word 1, $(GEN_DEB_VER)) \
-e VERSION=$(word 2, $(GEN_DEB_VER)) \
-e CLI_GITCOMMIT=$(CLI_GITCOMMIT) \
-e ENGINE_GITCOMMIT=$(ENGINE_GITCOMMIT) \
-e BUILDX_VERSION=$(DOCKER_BUILDX_REF) \
-e BUILDX_DEB_VERSION=$(word 1, $(GEN_BUILDX_DEB_VER)) \
-e BUILDX_GITCOMMIT=$(BUILDX_GITCOMMIT) \
-e COMPOSE_VERSION=$(DOCKER_COMPOSE_REF) \
-e COMPOSE_DEB_VERSION=$(word 1, $(GEN_COMPOSE_DEB_VER)) \
-e MODEL_VERSION=$(DOCKER_MODEL_REF) \
-e MODEL_DEB_VERSION=$(word 1, $(GEN_MODEL_DEB_VER)) \
-v $(CURDIR)/debbuild/$@:/build \
$(RUN_FLAGS) \
debbuild-$@/$(ARCH)
SOURCE_FILES=engine-image cli.tgz engine.tgz docker.service docker.socket distribution_based_engine.json plugin-installers.tgz
SOURCES=$(addprefix sources/, $(SOURCE_FILES))
DEBIAN_VERSIONS ?= debian-bullseye debian-bookworm debian-trixie
UBUNTU_VERSIONS ?= ubuntu-jammy ubuntu-noble ubuntu-oracular ubuntu-plucky
RASPBIAN_VERSIONS ?= raspbian-bullseye raspbian-bookworm
DISTROS := $(DEBIAN_VERSIONS) $(UBUNTU_VERSIONS) $(RASPBIAN_VERSIONS)
.PHONY: help
help: ## show make targets
@ -50,91 +68,73 @@ clean: ## remove build artifacts
$(RM) -r debbuild
[ ! -d sources ] || $(CHOWN) -R $(shell id -u):$(shell id -g) sources
$(RM) -r sources
$(RM) engine-image
engine-$(ARCH).tar:
$(MAKE) -C ../image image-linux
docker save -o $@ $$(cat ../image/image-linux)
-docker builder prune -f --filter until=24h
.PHONY: deb
deb: ubuntu debian raspbian ## build all deb packages
deb: ubuntu debian ## build all deb packages except for raspbian
.PHONY: ubuntu
ubuntu: ubuntu-bionic ubuntu-xenial ## build all ubuntu deb packages
ubuntu: $(UBUNTU_VERSIONS) ## build all ubuntu deb packages
.PHONY: debian
debian: debian-stretch ## build all debian deb packages
debian: $(DEBIAN_VERSIONS) ## build all debian deb packages
.PHONY: raspbian
raspbian: raspbian-stretch ## build all raspbian deb packages
raspbian: $(RASPBIAN_VERSIONS) ## build all raspbian deb packages
.PHONY: ubuntu-%
ubuntu-%: ## build ubuntu deb packages
ubuntu-%: $(SOURCES)
.PHONY: $(DISTROS)
$(DISTROS): sources
@echo "== Building packages for $@ =="
mkdir -p "debbuild/$@"
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
$(CHOWN) -R $(shell id -u):$(shell id -g) "debbuild/$@"
.PHONY: debian-buster
debian-buster: ## build debian buster deb packages
debian-buster: $(SOURCES)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
.PHONY: debian-stretch
debian-stretch: ## build debian stretch deb packages
debian-stretch: $(SOURCES)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
.PHONY: raspbian-stretch
raspbian-stretch: ## build raspbian stretch deb packages
raspbian-stretch: $(SOURCES)
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) debbuild/$@
.PHONY: sources
sources: sources/cli.tgz sources/engine.tgz sources/buildx.tgz sources/compose.tgz sources/model.tgz
sources/engine.tgz:
mkdir -p $(@D)
docker run --rm -i -w /v \
-v $(ENGINE_DIR):/engine \
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/docker):/engine \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/engine.tgz --exclude .git engine
sources/cli.tgz:
mkdir -p $(@D)
docker run --rm -i -w /v \
-v $(CLI_DIR):/cli \
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/cli):/cli \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/cli.tgz --exclude .git cli
sources/docker.service: ../systemd/docker.service
sources/buildx.tgz:
mkdir -p $(@D)
cp $< $@
sources/docker.socket: ../systemd/docker.socket
mkdir -p $(@D)
cp $< $@
# TODO: Figure out how to decouple this
# TODO: These might just end up being static files that are hardcoded
# TODO: FROM HERE <=====================
sources/distribution_based_engine.json: sources/engine-image
mkdir -p $(@D)
echo '{"platform":"Docker Engine - Community","engine_image":"engine-community","containerd_min_version":"1.2.0-beta.1","runtime":"host_install"}' > $@
sources/engine-image:
mkdir -p $(@D)
echo "docker.io/dockereng/engine-community:$(STATIC_VERSION)" > $@
# TODO: TO HERE <=====================
sources/plugin-installers.tgz: $(wildcard ../plugins/*)
docker run --rm -i -w /v \
-v $(shell readlink -e ../plugins):/plugins \
-v $(CURDIR)/sources:/v \
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/buildx):/buildx \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/plugin-installers.tgz --exclude .git plugins
tar -C / -c -z -f /v/buildx.tgz --exclude .git buildx
sources/compose.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/compose):/compose \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/compose.tgz --exclude .git compose
sources/model.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/model-cli):/model \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/model.tgz --exclude .git model
# See ARCHES in common.mk. Could not figure out how to match both distro and arch.
BUNDLES:=$(addsuffix .tar.gz,$(addprefix debbuild/bundles-ce-%-,$(ARCHES)))
$(BUNDLES): %
tar czf $@ --transform="s|^debbuild/\(.*\)|bundles/$(VERSION)/build-deb/\1|" debbuild/$*

View File

@ -3,30 +3,37 @@
`.deb` packages can be built from this directory with the following syntax
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli deb
make deb
```
Artifacts will be located in `debbuild` under the following directory structure:
`debbuild/$distro-$distro_version/`
### NOTES:
### Building from local source
Specify the location of the source repositories for the engine and cli when
building packages
* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker`
* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli`
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli deb
```
## Specifying a specific distro
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli ubuntu
make ubuntu
```
## Specifying a specific distro version
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli ubuntu-xenial
make ubuntu-noble
```
## Building the latest docker-ce
## Building the for all distros
```shell
git clone https://github.com/docker/docker-ce.git
make ENGINE_DIR=docker-ce/components/engine CLI_DIR=docker-ce/components/cli deb
make deb
```

View File

@ -6,27 +6,36 @@ set -e
mkdir -p /root/build-deb/engine
tar -C /root/build-deb -xzf /sources/engine.tgz
mkdir -p /root/build-deb/cli
tar -C /root/build-deb -xzf /sources/cli.tgz
tar -C /root/build-deb -xzf /sources/cli.tgz
mkdir -p /root/build-deb/buildx
tar -C /root/build-deb -xzf /sources/buildx.tgz
mkdir -p /root/build-deb/compose
tar -C /root/build-deb -xzf /sources/compose.tgz
mkdir -p /root/build-deb/model
tar -C /root/build-deb -xzf /sources/model.tgz
# link them to their canonical path
mkdir -p /go/src/github.com/docker
ln -snf /root/build-deb/engine /go/src/github.com/docker/docker
ln -snf /root/build-deb/cli /go/src/github.com/docker/cli
ln -snf /root/build-deb/buildx /go/src/github.com/docker/buildx
ln -snf /root/build-deb/compose /go/src/github.com/docker/compose
ln -snf /root/build-deb/model /go/src/github.com/docker/model-cli
EPOCH="${EPOCH:-}"
EPOCH_SEP=""
if [[ ! -z "$EPOCH" ]]; then
EPOCH_SEP=":"
EPOCH_SEP=":"
fi
if [[ -z "$DEB_VERSION" ]]; then
echo "DEB_VERSION is required to build deb packages"
exit 1
echo "DEB_VERSION is required to build deb packages"
exit 1
fi
echo VERSION AAA $VERSION
VERSION=${VERSION:-$( cat cli/VERSION )}
VERSION=${VERSION:-$(cat cli/VERSION)}
echo VERSION bbb $VERSION
@ -34,15 +43,47 @@ debSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' debian/control)"
debMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)"
debDate="$(date --rfc-2822)"
# Include an extra `1` in the version, in case we ever would have to re-build an
# already published release with a packaging-only change.
pkgRevision=1
# Generate changelog. The version/name of the generated packages are based on this.
#
# Resulting packages are formatted as;
#
# - name of the package (e.g., "docker-ce")
# - version (e.g., "23.0.0~beta.0")
# - pkgRevision (usually "-0", see above), which allows updating packages with
# packaging-only changes (without a corresponding release of the software
# that's packaged).
# - distro (e.g., "ubuntu")
# - VERSION_ID (e.g. "22.04" or "11") this must be "sortable" to make sure that
# packages are upgraded when upgrading to a newer distro version ("codename"
# cannot be used for this, as they're not sorted)
# - SUITE ("codename"), e.g. "jammy" or "bullseye". This is mostly for convenience,
# because some places refer to distro versions by codename, others by version.
# we prefix the codename with a tilde (~), which effectively excludes it from
# version comparison.
#
# Note that while the `${EPOCH}${EPOCH_SEP}` is part of the version, it is not
# included in the package's *filename*. (And if you're wondering: we needed the
# EPOCH because of our use of CalVer, which made version comparing not work in
# some cases).
#
# Examples:
#
# docker-ce_23.0.0~beta.0-1~debian.11~bullseye_amd64.deb
# docker-ce_23.0.0~beta.0-1~ubuntu.22.04~jammy_amd64.deb
cat > "debian/changelog" <<-EOF
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-0~${DISTRO}-${SUITE}) $SUITE; urgency=low
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-${pkgRevision}~${DISTRO}.${VERSION_ID}~${SUITE}) $SUITE; urgency=low
* Version: $VERSION
-- $debMaintainer $debDate
EOF
# The space above at the start of the line for the debMaintainer is very important
# Give the script a git commit because it wants it
export DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT-$(cd cli; $GIT_COMMAND rev-parse --short HEAD)}
export CLI_GITCOMMIT=${CLI_GITCOMMIT-$(cd cli; $GIT_COMMAND rev-parse --short HEAD)}
export ENGINE_GITCOMMIT=${ENGINE_GITCOMMIT-$(cd engine; $GIT_COMMAND rev-parse --short HEAD)}
echo VERSION BBB $VERSION
dpkg-buildpackage -uc -us -I.git

View File

@ -1 +0,0 @@
9

View File

@ -4,18 +4,13 @@ Priority: optional
Maintainer: Docker <support@docker.com>
Build-Depends: bash,
bash-completion,
libbtrfs-dev | btrfs-tools,
ca-certificates,
cmake,
dh-apparmor,
dh-systemd,
debhelper-compat (= 12),
gcc,
git,
libc-dev,
libdevmapper-dev,
libltdl-dev,
libseccomp-dev,
libseccomp2,
libsystemd-dev,
libtool,
make,
@ -27,24 +22,32 @@ Vcs-Git: git://github.com/docker/docker.git
Package: docker-ce
Architecture: linux-any
Depends: docker-ce-cli, containerd.io, iptables, libseccomp2 (>= 2.3.0), ${shlibs:Depends}
Recommends: aufs-tools,
Pre-Depends: init-system-helpers (>= 1.54~)
Depends: containerd.io (>= 1.7.27),
docker-ce-cli,
iptables,
${shlibs:Depends}
Recommends: apparmor,
ca-certificates,
cgroupfs-mount | cgroup-lite,
docker-ce-rootless-extras,
git,
pigz,
xz-utils,
libltdl7,
${apparmor:Recommends}
Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs
Replaces: docker-engine
procps,
xz-utils
Suggests: cgroupfs-mount | cgroup-lite,
kmod,
Conflicts: docker (<< 1.5~),
docker-engine,
docker.io
Replaces: docker-engine,
docker-ce-cli (<< 5:28.0.0)
Description: Docker: the open-source application container engine
Docker is a product for you to build, ship and run any application as a
lightweight container
.
Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest cloud compute instance and
everything in between - and they don't require you to use a particular
they can run anywhere, from your laptop to the largest cloud compute instance
and everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
@ -52,7 +55,12 @@ Description: Docker: the open-source application container engine
Package: docker-ce-cli
Architecture: linux-any
Depends: ${shlibs:Depends}
Conflicts: docker (<< 1.5~), docker.io, lxc-docker, lxc-docker-virtual-package, docker-engine, docker-engine-cs
Recommends: docker-buildx-plugin,
docker-compose-plugin
Suggests: docker-model-plugin
Conflicts: docker (<< 1.5~),
docker-engine,
docker.io
Replaces: docker-ce (<< 5:0)
Breaks: docker-ce (<< 5:0)
Description: Docker CLI: the open-source application container engine
@ -60,8 +68,56 @@ Description: Docker CLI: the open-source application container engine
lightweight container
.
Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest cloud compute instance and
everything in between - and they don't require you to use a particular
they can run anywhere, from your laptop to the largest cloud compute instance
and everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
Package: docker-ce-rootless-extras
Architecture: linux-any
Depends: dbus-user-session,
${shlibs:Depends}
Enhances: docker-ce
Conflicts: rootlesskit
Replaces: rootlesskit
Breaks: rootlesskit
# slirp4netns (>= 0.4.0) is available in Debian since 11 and Ubuntu since 19.10
Recommends: slirp4netns (>= 0.4.0)
# Unlike RPM, DEB packages do not contain "Recommends: fuse-overlayfs (>= 0.7.0)" here,
# because Debian (since 10) and Ubuntu support the kernel-mode rootless overlayfs.
Description: Rootless support for Docker.
Use dockerd-rootless.sh to run the daemon.
Use dockerd-rootless-setuptool.sh to setup systemd for dockerd-rootless.sh.
This package contains RootlessKit, but does not contain VPNKit.
Either VPNKit or slirp4netns (>= 0.4.0) needs to be installed separately.
Homepage: https://docs.docker.com/engine/security/rootless/
Package: docker-buildx-plugin
Priority: optional
Replaces: docker-ce-cli
Architecture: linux-any
Enhances: docker-ce-cli
Description: Docker Buildx cli plugin.
This plugin provides the 'docker buildx' subcommand.
Homepage: https://github.com/docker/buildx
Package: docker-compose-plugin
Priority: optional
Architecture: linux-any
Recommends: docker-buildx-plugin
Enhances: docker-ce-cli
Description: Docker Compose (V2) plugin for the Docker CLI.
This plugin provides the 'docker compose' subcommand.
.
The binary can also be run standalone as a direct replacement for
Docker Compose V1 ('docker-compose').
Homepage: https://github.com/docker/compose
Package: docker-model-plugin
Priority: optional
Architecture: linux-any
Enhances: docker-ce-cli
Description: Docker Model Runner plugin for the Docker CLI.
This plugin provides the 'docker model' subcommand.
Homepage: https://docs.docker.com/model-runner/

View File

@ -1 +0,0 @@
cli/contrib/completion/bash/docker

View File

@ -0,0 +1 @@
/etc/docker

View File

@ -1,20 +0,0 @@
# Docker Upstart and SysVinit configuration file
#
# THIS FILE DOES NOT APPLY TO SYSTEMD
#
# Please see the documentation for "systemd drop-ins":
# https://docs.docker.com/engine/admin/systemd/
#
# Customize location of Docker binary (especially for development testing).
#DOCKERD="/usr/local/bin/dockerd"
# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"
# This is also a handy place to tweak where Docker's temporary files go.
#export DOCKER_TMPDIR="/mnt/bigdrive/docker-tmp"

View File

@ -0,0 +1 @@
../engine/contrib/init/sysvinit-debian/docker.default

View File

@ -1,156 +0,0 @@
#!/bin/sh
set -e
### BEGIN INIT INFO
# Provides: docker
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: cgroupfs-mount cgroup-lite
# Should-Stop: cgroupfs-mount cgroup-lite
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Create lightweight, portable, self-sufficient containers.
# Description:
# Docker is an open-source project to easily create lightweight, portable,
# self-sufficient containers from any application. The same container that a
# developer builds and tests on a laptop can run at scale, in production, on
# VMs, bare metal, OpenStack clusters, public clouds and more.
### END INIT INFO
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
BASE=docker
# modify these in /etc/default/$BASE (/etc/default/docker)
DOCKERD=/usr/bin/dockerd
# This is the pid file managed by docker itself
DOCKER_PIDFILE=/var/run/$BASE.pid
# This is the pid file created/managed by start-stop-daemon
DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid
DOCKER_LOGFILE=/var/log/$BASE.log
DOCKER_OPTS=
DOCKER_DESC="Docker"
# Get lsb functions
. /lib/lsb/init-functions
if [ -f /etc/default/$BASE ]; then
. /etc/default/$BASE
fi
# Check docker is present
if [ ! -x $DOCKERD ]; then
log_failure_msg "$DOCKERD not present or not executable"
exit 1
fi
check_init() {
# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it directly)
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then
log_failure_msg "$DOCKER_DESC is managed via upstart, try using service $BASE $1"
exit 1
fi
}
fail_unless_root() {
if [ "$(id -u)" != '0' ]; then
log_failure_msg "$DOCKER_DESC must be run as root"
exit 1
fi
}
cgroupfs_mount() {
# see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount
if grep -v '^#' /etc/fstab | grep -q cgroup \
|| [ ! -e /proc/cgroups ] \
|| [ ! -d /sys/fs/cgroup ]; then
return
fi
if ! mountpoint -q /sys/fs/cgroup; then
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
fi
(
cd /sys/fs/cgroup
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do
mkdir -p $sys
if ! mountpoint -q $sys; then
if ! mount -n -t cgroup -o $sys cgroup $sys; then
rmdir $sys || true
fi
fi
done
)
}
case "$1" in
start)
check_init
fail_unless_root
cgroupfs_mount
touch "$DOCKER_LOGFILE"
chgrp docker "$DOCKER_LOGFILE"
ulimit -n 1048576
# Having non-zero limits causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
if [ "$BASH" ]; then
ulimit -u unlimited
else
ulimit -p unlimited
fi
log_begin_msg "Starting $DOCKER_DESC: $BASE"
start-stop-daemon --start --background \
--no-close \
--exec "$DOCKERD" \
--pidfile "$DOCKER_SSD_PIDFILE" \
--make-pidfile \
-- \
-p "$DOCKER_PIDFILE" \
$DOCKER_OPTS \
>> "$DOCKER_LOGFILE" 2>&1
log_end_msg $?
;;
stop)
check_init
fail_unless_root
if [ -f "$DOCKER_SSD_PIDFILE" ]; then
log_begin_msg "Stopping $DOCKER_DESC: $BASE"
start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" --retry 10
log_end_msg $?
else
log_warning_msg "Docker already stopped - file $DOCKER_SSD_PIDFILE not found."
fi
;;
restart)
check_init
fail_unless_root
docker_pid=`cat "$DOCKER_SSD_PIDFILE" 2>/dev/null`
[ -n "$docker_pid" ] \
&& ps -p $docker_pid > /dev/null 2>&1 \
&& $0 stop
$0 start
;;
force-reload)
check_init
fail_unless_root
$0 restart
;;
status)
check_init
status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKERD" "$DOCKER_DESC"
;;
*)
echo "Usage: service docker {start|stop|restart|status}"
exit 1
;;
esac

View File

@ -0,0 +1 @@
../engine/contrib/init/sysvinit-debian/docker

View File

@ -0,0 +1 @@
../engine/contrib/init/systemd/docker.service

View File

@ -0,0 +1 @@
../engine/contrib/init/systemd/docker.socket

View File

@ -1,72 +0,0 @@
description "Docker daemon"
start on (filesystem and net-device-up IFACE!=lo)
stop on runlevel [!2345]
limit nofile 524288 1048576
# Having non-zero limits causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
limit nproc unlimited unlimited
respawn
kill timeout 20
pre-start script
# see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount
if grep -v '^#' /etc/fstab | grep -q cgroup \
|| [ ! -e /proc/cgroups ] \
|| [ ! -d /sys/fs/cgroup ]; then
exit 0
fi
if ! mountpoint -q /sys/fs/cgroup; then
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
fi
(
cd /sys/fs/cgroup
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do
mkdir -p $sys
if ! mountpoint -q $sys; then
if ! mount -n -t cgroup -o $sys cgroup $sys; then
rmdir $sys || true
fi
fi
done
)
end script
script
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker)
DOCKERD=/usr/bin/dockerd
DOCKER_OPTS=
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
exec "$DOCKERD" $DOCKER_OPTS --raw-logs
end script
# Don't emit "started" event until docker.sock is ready.
# See https://github.com/docker/docker/issues/6647
post-start script
DOCKER_OPTS=
DOCKER_SOCKET=
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
if ! printf "%s" "$DOCKER_OPTS" | grep -qE -e '-H|--host'; then
DOCKER_SOCKET=/var/run/docker.sock
else
DOCKER_SOCKET=$(printf "%s" "$DOCKER_OPTS" | grep -oP -e '(-H|--host)\W*unix://\K(\S+)' | sed 1q)
fi
if [ -n "$DOCKER_SOCKET" ]; then
while ! [ -e "$DOCKER_SOCKET" ]; do
initctl status $UPSTART_JOB | grep -qE "(stop|respawn)/" && exit 1
echo "Waiting for $DOCKER_SOCKET"
sleep 0.1
done
echo "$DOCKER_SOCKET is up"
fi
end script

View File

@ -0,0 +1 @@
rm_conffile /etc/init/docker.conf 5:24.0.5-1~

View File

@ -0,0 +1 @@
engine/man/man*/*

0
deb/common/docker-ce.postinst Normal file → Executable file
View File

174
deb/common/rules Normal file → Executable file
View File

@ -1,60 +1,149 @@
#!/usr/bin/make -f
# Include default Makefile variables.
include /usr/share/dpkg/default.mk
# Build all armhf binaries as ARMv6 with hard float, to support both
# Debian armhf and Raspbian armhf.
ifeq ($(DEB_TARGET_ARCH),armhf)
export CFLAGS += -marm -march=armv6+fp
export GOARM := 6
endif
VERSION ?= $(shell cat engine/VERSION)
DOCKER_GOPATH := /go/src/github.com/docker
# TODO(thaJeztah): allow passing this version when building.
PKG_REVISION ?= 1
export PKG_REVISION
override_dh_gencontrol:
# if we're on Ubuntu, we need to Recommends: apparmor
echo 'apparmor:Recommends=$(shell dpkg-vendor --is Ubuntu && echo apparmor)' >> debian/docker-ce.substvars
dh_gencontrol
# force packages to be built with xz compression, as Ubuntu 21.10 and up use
# zstd compression, which is non-standard, and breaks 'dpkg-sig --verify'
override_dh_builddeb:
dh_builddeb -- -Zxz
# Determine the Go module mode based on the presence of vendor.mod or go.mod
override_dh_auto_build: GOMOD := $(if $(wildcard engine/vendor.mod),off,$(if $(wildcard engine/go.mod),on,$(error "No go.mod or vendor.mod found in engine directory")))
# Override the default dh_auto_build target
override_dh_auto_build:
# Build the daemon and dependencies
cd engine && PRODUCT=docker ./hack/make.sh dynbinary
cd engine && GO111MODULE=$(GOMOD) DOCKER_GITCOMMIT=$(ENGINE_GITCOMMIT) PRODUCT=docker ./hack/make.sh dynbinary
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh proxy dynamic
cd engine && TMP_GOPATH="/go" hack/dockerfile/install/install.sh rootlesskit dynamic
# build man-pages
make -C engine/man
# Build the CLI
cd /go/src/github.com/docker/cli && \
LDFLAGS='' DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=$(VERSION) GITCOMMIT=$(DOCKER_GITCOMMIT) dynbinary manpages
# Build the CLI plugins
# Make sure to set LDFLAGS="" since, dpkg-buildflags sets it to some weird values
set -e;cd /sources && \
tar xzf plugin-installers.tgz; \
for installer in plugins/*.installer; do \
LDFLAGS='' bash $${installer} build; \
done
make -C /go/src/github.com/docker/cli DISABLE_WARN_OUTSIDE_CONTAINER=1 VERSION=$(VERSION) GITCOMMIT=$(CLI_GITCOMMIT) LDFLAGS='' dynbinary manpages shell-completion
# Build buildx plugin
cd /go/src/github.com/docker/buildx \
&& mkdir -p /usr/libexec/docker/cli-plugins/ \
&& GO111MODULE=on \
CGO_ENABLED=0 \
go build \
-mod=vendor \
-trimpath \
-ldflags "-w -X github.com/docker/buildx/version.Version=$(BUILDX_VERSION) -X github.com/docker/buildx/version.Revision=$(BUILDX_GITCOMMIT) -X github.com/docker/buildx/version.Package=github.com/docker/buildx" \
-o "/usr/libexec/docker/cli-plugins/docker-buildx" \
./cmd/buildx
# Build the compose plugin
make -C /go/src/github.com/docker/compose VERSION=$(COMPOSE_VERSION) DESTDIR=/usr/libexec/docker/cli-plugins build
# Build the model plugin
GO111MODULE=on make -C /go/src/github.com/docker/model-cli VERSION=$(MODEL_VERSION) ce-release \
&& mv /go/src/github.com/docker/model-cli/dist/docker-model /usr/libexec/docker/cli-plugins/docker-model
override_dh_auto_test:
./engine/bundles/dynbinary-daemon/dockerd -v
./cli/build/docker -v
ver="$$(engine/bundles/dynbinary-daemon/dockerd --version)"; \
test "$$ver" = "Docker version $(VERSION), build $(ENGINE_GITCOMMIT)" && echo "PASS: daemon version OK" || (echo "FAIL: daemon version ($$ver) did not match" && exit 1)
ver="$$(cli/build/docker --version)"; \
test "$$ver" = "Docker version $(VERSION), build $(CLI_GITCOMMIT)" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($$ver) did not match" && exit 1)
ver="$$(/usr/libexec/docker/cli-plugins/docker-buildx docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(BUILDX_VERSION)" && echo "PASS: docker-buildx version OK" || (echo "FAIL: docker-buildx version ($$ver) did not match" && exit 1)
ver="$$(/usr/libexec/docker/cli-plugins/docker-compose docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(COMPOSE_VERSION)" && echo "PASS: docker-compose version OK" || (echo "FAIL: docker-compose version ($$ver) did not match" && exit 1)
ver="$$(/usr/libexec/docker/cli-plugins/docker-model docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \
test "$$ver" = "$(MODEL_VERSION)" && echo "PASS: docker-model version OK" || (echo "FAIL: docker-model version ($$ver) did not match" && exit 1)
override_dh_strip:
# Go has lots of problems with stripping, so just don't
# http://manpages.debian.org/dh_dwz
override_dh_dwz:
# dh_dwz in debhelper versions less than 13 has issues with files that are missing debug symbols (once we update to debhelper-compat 13+ this can be removed)
@# https://packages.debian.org/debhelper
@# https://packages.ubuntu.com/debhelper
override_dh_auto_install:
# docker-ce-cli install
install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish
install -D -m 0644 /go/src/github.com/docker/cli/contrib/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker
install -D -m 0755 /go/src/github.com/docker/cli/build/docker debian/docker-ce-cli/usr/bin/docker
set -e;cd /sources && \
tar xzf plugin-installers.tgz; \
for installer in plugins/*.installer; do \
DESTDIR=/root/build-deb/debian/docker-ce-cli \
PREFIX=/usr/libexec/docker/cli-plugins \
bash $${installer} install_plugin; \
done
install -D -p -m 0755 cli/build/docker debian/docker-ce-cli/usr/bin/docker
# docker-ce-cli shell-completion
#
# We are manually installing bash completions instead of using the "dh_bash-completion"
# debhelper (see [1]); dh_bash-completion only supports bash, and none of the other shells,
# which meant that we had to install 2 out of 3 manually, which was confusing ("what about
# Bash?"). Given that locations to install these completion scripts are well-known, we
# can safely use the manual approach for installing them.
#
# In future, can consider using "dh_shell_completions" (see [2]), which supports bash, zsh
# and fish. However, "dh_shell_completions" is still really premature, and not available
# in stable releases. So, currently, adding it as build-dependency, especially since
# these are well-known, may not be a good choice, but we can revisit that in future
# if things mature in this area.
#
# Observant readers may notice that we don't include PowerShell completion in
# this list (even though Cobra provides them, and PowerShell *can* be installed
# oon Linux). The short story is that there's no well-defined location, nor
# a well-defined approach for this.
#
# The PowerShell maintainers (see [3]) considering that no completion scripts
# are needed for anything following the PowerShell specifications, and for
# anything else, PowerShell is capable enough to use zsh and bash completions.
#
# All of the above taken into account; it's fuzzy enough to just leave it as
# an exercise for the user to decide what to do.
#
# [1]: https://manpages.debian.org/bookworm/bash-completion/dh_bash-completion.1.en.html
# [2]: https://manpages.debian.org/testing/dh-shell-completions/dh_shell_completions.1.en.html
# [3]: https://github.com/PowerShell/PowerShell/issues/17582
install -D -p -m 0644 cli/build/completion/bash/docker debian/docker-ce-cli/usr/share/bash-completion/completions/docker
install -D -p -m 0644 cli/build/completion/fish/docker.fish debian/docker-ce-cli/usr/share/fish/vendor_completions.d/docker.fish
install -D -p -m 0644 cli/build/completion/zsh/_docker debian/docker-ce-cli/usr/share/zsh/vendor-completions/_docker
# docker-ce install
install -D -m 0644 /sources/docker.service debian/docker-ce/lib/systemd/system/docker.service
install -D -m 0644 /sources/docker.socket debian/docker-ce/lib/systemd/system/docker.socket
install -D -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd
install -D -m 0755 /usr/local/bin/docker-proxy debian/docker-ce/usr/bin/docker-proxy
install -D -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/bin/docker-init
install -D -m 0644 /sources/distribution_based_engine.json debian/docker-ce/var/lib/docker-engine/distribution_based_engine.json
install -D -p -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/dockerd) debian/docker-ce/usr/bin/dockerd
install -D -p -m 0755 $(shell readlink -e engine/bundles/dynbinary-daemon/docker-proxy) debian/docker-ce/usr/bin/docker-proxy
install -D -p -m 0755 /usr/local/bin/docker-init debian/docker-ce/usr/libexec/docker/docker-init
# docker-buildx-plugin install
install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-buildx debian/docker-buildx-plugin/usr/libexec/docker/cli-plugins/docker-buildx
# docker-compose-plugin install
install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-compose debian/docker-compose-plugin/usr/libexec/docker/cli-plugins/docker-compose
# docker-model-plugin install
install -D -p -m 0755 /usr/libexec/docker/cli-plugins/docker-model debian/docker-model-plugin/usr/libexec/docker/cli-plugins/docker-model
# docker-ce-rootless-extras install
install -D -p -m 0755 /usr/local/bin/rootlesskit debian/docker-ce-rootless-extras/usr/bin/rootlesskit
install -D -p -m 0755 engine/contrib/dockerd-rootless.sh debian/docker-ce-rootless-extras/usr/bin/dockerd-rootless.sh
install -D -p -m 0755 engine/contrib/dockerd-rootless-setuptool.sh debian/docker-ce-rootless-extras/usr/bin/dockerd-rootless-setuptool.sh
# TODO: how can we install vpnkit?
override_dh_installinit:
# use "docker" as our service name, not "docker-ce"
dh_installinit --name=docker
override_dh_installsystemd:
# use "docker" as our service name, not "docker-ce"
dh_installsystemd --name=docker
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
@ -63,5 +152,20 @@ override_dh_install:
# TODO Can we do this from within our container?
dh_apparmor --profile-name=docker-ce -pdocker-ce
override_dh_gencontrol:
# Use separate version for the buildx-plugin package, then generate the other control files as usual
# TODO override "Source" field in control as well (to point to buildx, as it doesn't match the package name)
dh_gencontrol -pdocker-buildx-plugin -- -v$${BUILDX_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}
# Use separate version for the compose-plugin package, then generate the other control files as usual
# TODO override "Source" field in control as well (to point to compose, as it doesn't match the package name)
dh_gencontrol -pdocker-compose-plugin -- -v$${COMPOSE_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}
# Use separate version for the model-plugin package, then generate the other control files as usual
# TODO override "Source" field in control as well (to point to model, as it doesn't match the package name)
dh_gencontrol -pdocker-model-plugin -- -v$${MODEL_DEB_VERSION#v}-$${PKG_REVISION}~$${DISTRO}.$${VERSION_ID}~$${SUITE}
dh_gencontrol --remaining-packages
%:
dh $@ --with=bash-completion $(shell command -v dh_systemd_enable > /dev/null 2>&1 && echo --with=systemd)
dh $@ --with=bash-completion

1
deb/common/source/format Normal file
View File

@ -0,0 +1 @@
1.0

View File

@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=debian
ARG SUITE=bookworm
ARG VERSION_ID=12
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=debian
ARG SUITE=bullseye
ARG VERSION_ID=11
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=debian:buster
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO debian
ENV SUITE buster
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=debian:stretch
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO debian
ENV SUITE stretch
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=debian
ARG SUITE=trixie
ARG VERSION_ID=13
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,87 +1,79 @@
#!/usr/bin/env bash
ENGINE_DIR="$1"
REPO_DIR="$1"
VERSION="$2"
origVersion=$VERSION
[[ $# < 2 ]] && echo 'not enough args' && exit 1
DATE_COMMAND="date"
if [[ $(uname) -eq "Darwin" ]]; then
DATE_COMMAND="docker run --rm alpine date"
if [ -z "$REPO_DIR" ] || [ -z "$VERSION" ]; then
# shellcheck disable=SC2016
echo 'usage: ./gen-deb-ver ${REPO_DIR} ${VERSION}'
exit 1
fi
gen_deb_version() {
# Adds an increment to the deb version to get proper order
# 18.01.0-tp1 -> 18.01.0-0.1-tp1
# 18.01.0-beta1 -> 18.01.0-1.1-beta1
# 18.01.0-rc1 -> 18.01.0-2.1-rc1
# 18.01.0 -> 18.01.0-3
fullVersion="$1"
pattern="$2"
increment="$3"
testVersion="${fullVersion#*-$pattern}"
baseVersion="${fullVersion%-"$pattern"*}"
echo "$baseVersion-$increment.$testVersion.$pattern$testVersion"
}
GIT_COMMAND="git -C $REPO_DIR"
origVersion="$VERSION"
debVersion="${VERSION#v}"
case "$VERSION" in
*-dev)
debVersion="$VERSION"
;;
*-tp[0-9]*)
debVersion="$(gen_deb_version "$VERSION" tp 0)"
;;
*-beta[0-9]*)
debVersion="$(gen_deb_version "$VERSION" beta 1)"
;;
*-rc[0-9]*)
debVersion="$(gen_deb_version "$VERSION" rc 2)"
;;
*)
debVersion="$VERSION-3"
;;
esac
# deb packages require a tilde (~) instead of a hyphen (-) as separator between
# the version # and pre-release suffixes, otherwise pre-releases are sorted AFTER
# non-pre-release versions, which would prevent users from updating from a pre-
# release version to the "ga" version.
#
# For details, see this thread on the Debian mailing list:
# https://lists.debian.org/debian-policy/1998/06/msg00099.html
#
# The code below replaces hyphens with tildes. Note that an intermediate $tilde
# variable is needed to make this work on all versions of Bash. In some versions
# of Bash, the tilde would be substituted with $HOME (even when escaped (\~) or
# quoted ('~').
tilde='~'
debVersion="${debVersion//-/$tilde}"
export TZ=UTC
# if we have a "-dev" suffix or have change in Git, this is a nightly build, and
# we'll create a pseudo version based on commit-date and -sha.
if [[ "$VERSION" == *-dev ]] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then
export TZ=UTC
tilde='~' # ouch Bash 4.2 vs 4.3, you keel me
# git running in different directories, backwards compatible too
GIT_COMMAND="git -C $ENGINE_DIR"
debVersion="${debVersion//-/$tilde}" # using \~ or '~' here works in 4.3, but not 4.2; just ~ causes $HOME to be inserted, hence the $tilde
# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
if [[ "$VERSION" == *-dev ]]; then
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
gitDate="$($DATE_COMMAND --utc --date "@$gitUnix" +'%Y%m%d%H%M%S')"
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
debVersion="0.0.0-${gitDate}-${gitCommit}"
origVersion=$debVersion
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
# verify that nightly builds are always < actual releases
#
# $ dpkg --compare-versions 1.5.0 gt 1.5.0~rc1 && echo true || echo false
# true
# $ dpkg --compare-versions 1.5.0~rc1 gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce-rc3 gt 18.06.0-ce-rc2 && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce gt 18.06.0-ce-rc2 && echo true || echo false
# false
# $ dpkg --compare-versions 18.06.0-ce-rc3 gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 0.0.0-20180719213702-cd5e2db gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
if [ "$(uname)" = "Darwin" ]; then
# Using BSD date (macOS), which doesn't support the --date option
# date -jf "<input format>" "<input value>" +"<output format>" (https://unix.stackexchange.com/a/86510)
gitDate="$(TZ=UTC date -u -jf "%s" "$gitUnix" +'%Y%m%d%H%M%S')"
else
# Using GNU date (Linux)
gitDate="$(TZ=UTC date -u --date "@$gitUnix" +'%Y%m%d%H%M%S')"
fi
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
# generated version is now something like '0.0.0-20180719213702-cd5e2db'
origVersion="0.0.0-${gitDate}-${gitCommit}" # (using hyphens)
debVersion="0.0.0~${gitDate}.${gitCommit}" # (using tilde and periods)
# verify that nightly builds are always < actual releases
#
# $ dpkg --compare-versions 1.5.0 gt 1.5.0~rc1 && echo true || echo false
# true
# $ dpkg --compare-versions 1.5.0~rc1 gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce-rc3 gt 18.06.0-ce-rc2 && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce gt 18.06.0-ce-rc2 && echo true || echo false
# false
# $ dpkg --compare-versions 18.06.0-ce-rc3 gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 18.06.0-ce gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
# $ dpkg --compare-versions 0.0.0-20180719213702-cd5e2db gt 0.0.0-20180719213347-5daff5a && echo true || echo false
# true
fi
echo "$debVersion" "$origVersion"

View File

@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=raspbian
ARG SUITE=bookworm
ARG VERSION_ID=12
ARG BUILD_IMAGE=balenalib/rpi-raspbian:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=raspbian
ARG SUITE=bullseye
ARG VERSION_ID=11
ARG BUILD_IMAGE=balenalib/rpi-raspbian:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=resin/rpi-raspbian:stretch
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO raspbian
ENV SUITE stretch
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=ubuntu:bionic
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO ubuntu
ENV SUITE bionic
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=ubuntu:cosmic
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO ubuntu
ENV SUITE cosmic
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=ubuntu:disco
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO ubuntu
ENV SUITE disco
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=ubuntu
ARG SUITE=jammy
ARG VERSION_ID=22.04
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=ubuntu
ARG SUITE=noble
ARG VERSION_ID=24.04
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=ubuntu
ARG SUITE=oracular
ARG VERSION_ID=24.10
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -0,0 +1,46 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=ubuntu
ARG SUITE=plucky
ARG VERSION_ID=25.04
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
# Remove diverted man binary to prevent man-pages being replaced with "minimized" message. See docker/for-linux#639
RUN if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then \
rm -f /usr/bin/man; \
dpkg-divert --quiet --remove --rename /usr/bin/man; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl devscripts equivs git
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ARG COMMON_FILES
COPY --link ${COMMON_FILES} /root/build-deb/debian
RUN apt-get update \
&& mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY --link sources/ /sources
ARG DISTRO
ARG SUITE
ARG VERSION_ID
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
ENV VERSION_ID=${VERSION_ID}
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

View File

@ -1,29 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=ubuntu:xenial
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
RUN apt-get update && apt-get install -y curl devscripts equivs git
ARG GO_VERSION
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV DOCKER_BUILDTAGS apparmor seccomp selinux
ENV RUNC_BUILDTAGS apparmor seccomp selinux
ARG COMMON_FILES
COPY ${COMMON_FILES} /root/build-deb/debian
RUN mk-build-deps -t "apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y" -i /root/build-deb/debian/control
COPY sources/ /sources
ENV DISTRO ubuntu
ENV SUITE xenial
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/build-deb
COPY build-deb /root/build-deb/build-deb
ENTRYPOINT ["/root/build-deb/build-deb"]

141
distros.json Normal file
View File

@ -0,0 +1,141 @@
{
"centos-9": {
"image": "quay.io/centos/centos:stream9",
"arches": [
"amd64",
"aarch64"
],
"description": "CentOS Stream 9",
"end_of_life": "2027"
},
"centos-10": {
"image": "quay.io/centos/centos:stream10",
"arches": [
"amd64",
"aarch64"
],
"description": "CentOS Stream 10",
"end_of_life": "2030"
},
"debian-bullseye": {
"image": "debian:bullseye",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Debian 11 (oldstable)"
},
"debian-bookworm": {
"image": "debian:bookworm",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Debian 12 (stable)"
},
"debian-trixie": {
"image": "debian:trixie",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Debian 13 (Next stable)"
},
"fedora-41": {
"image": "fedora:41",
"arches": [
"amd64",
"aarch64"
],
"end_of_life": "November, 2025"
},
"fedora-42": {
"image": "fedora:42",
"arches": [
"amd64",
"aarch64"
],
"end_of_life": "November, 2025"
},
"raspbian-bullseye": {
"image": "balenalib/rpi-raspbian:bullseye",
"arches": [
"armhf"
],
"description": "Debian/Raspbian 11 (stable)"
},
"raspbian-bookworm": {
"image": "balenalib/rpi-raspbian:bookworm",
"arches": [
"armhf"
],
"description": "Debian/Raspbian 12 (next stable)"
},
"ubuntu-jammy": {
"image": "ubuntu:jammy",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Ubuntu 22.04 LTS",
"end_of_life": "04-2032",
"end_of_support": "04-2027"
},
"ubuntu-noble": {
"image": "ubuntu:noble",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Ubuntu 24.04 LTS",
"end_of_life": "04-2034",
"end_of_support": "06-2029"
},
"ubuntu-oracular": {
"image": "ubuntu:oracular",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Ubuntu 24.10",
"end_of_life": "07-2025",
"end_of_support": "07-2025"
},
"ubuntu-plucky": {
"image": "ubuntu:plucky",
"arches": [
"amd64",
"aarch64",
"armhf"
],
"description": "Ubuntu 25.04",
"end_of_life": "01-2026",
"end_of_support": "01-2026"
},
"rhel-8": {
"image": "registry.access.redhat.com/ubi8/ubi",
"arches": [
"amd64",
"aarch64"
],
"description": "Red Hat Enterprise Linux 8",
"end_of_life": "05-2029",
"end_of_support": "05-2024"
},
"rhel-9": {
"image": "registry.access.redhat.com/ubi9/ubi",
"arches": [
"amd64",
"aarch64"
],
"description": "Red Hat Enterprise Linux 9",
"end_of_life": "05-2032",
"end_of_support": "05-2027"
}
}

View File

@ -1,101 +0,0 @@
# Common builder
ARG GO_IMAGE
FROM ${GO_IMAGE} as builder
COPY hack/dockerfile/install/tini.installer /
COPY hack/dockerfile/install/proxy.installer /
RUN apt-get update && apt-get install -y \
bash \
btrfs-tools \
ca-certificates \
cmake \
gcc \
git \
libc-dev \
libgcc-6-dev \
libltdl-dev \
libseccomp-dev \
libtool \
make
RUN grep "_COMMIT=" /*.installer |cut -f2- -d: > /binaries-commits
# dockerd
FROM builder as dockerd-builder
RUN apt-get install -y \
libsystemd-dev
WORKDIR /go/src/github.com/docker/docker
COPY . /go/src/github.com/docker/docker
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG PRODUCT
ARG DEFAULT_PRODUCT_LICENSE
ENV VERSION ${VERSION}
ENV GITCOMMIT ${GITCOMMIT}
ENV BUILDTIME ${BUILDTIME}
ENV PLATFORM ${PLATFORM}
ENV PRODUCT ${PRODUCT}
ENV DEFAULT_PRODUCT_LICENSE ${DEFAULT_PRODUCT_LICENSE}
# TODO The way we set the version could easily be simplified not to depend on hack/...
RUN bash ./hack/make/.go-autogen
RUN go build -o /sbin/dockerd \
-tags 'autogen apparmor seccomp selinux journald exclude_graphdriver_devicemapper' \
-i \
-buildmode=pie \
-a -ldflags '-w'\
github.com/docker/docker/cmd/dockerd
# docker-proxy
# TODO if libnetwork folds into the docker tree this can be combined above
FROM builder as proxy-builder
RUN git clone https://github.com/docker/libnetwork.git /go/src/github.com/docker/libnetwork
WORKDIR /go/src/github.com/docker/libnetwork
RUN . /binaries-commits && \
git checkout -q "$LIBNETWORK_COMMIT" && \
CGO_ENABLED=0 go build -buildmode=pie -ldflags="$PROXY_LDFLAGS" \
-o /sbin/docker-proxy \
github.com/docker/libnetwork/cmd/proxy
# docker-init - TODO move this out, last time we bumped was 2016!
FROM builder as init-builder
RUN git clone https://github.com/krallin/tini.git /tini
WORKDIR /tini
RUN . /binaries-commits && \
git checkout -q "$TINI_COMMIT" && \
cmake . && make tini-static && \
cp tini-static /sbin/docker-init
# runc
FROM builder as runc-builder
RUN apt-get install -y libseccomp-dev
RUN git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/runc
WORKDIR /go/src/github.com/opencontainers/runc
RUN . /binaries-commits && \
git checkout -q "$RUNC_COMMIT" && \
make BUILDTAGS='seccomp apparmor' static && make install
# Final docker image
FROM scratch
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG ENGINE_IMAGE
COPY --from=dockerd-builder /sbin/dockerd /bin/
COPY --from=proxy-builder /sbin/docker-proxy /bin/
COPY --from=init-builder /sbin/docker-init /bin/
COPY --from=runc-builder /usr/local/sbin/runc /bin/
LABEL \
org.opencontainers.image.authors="Docker Inc." \
org.opencontainers.image.created="${BUILDTIME}" \
org.opencontainers.image.documentation="https://docs.docker.com/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.revision="${GITCOMMIT}" \
org.opencontainers.image.url="https://www.docker.com/products/docker-engine" \
org.opencontainers.image.vendor="Docker Inc." \
org.opencontainers.image.version="${VERSION}" \
com.docker.distribution_based_engine="{\"platform\":\"${PLATFORM}\",\"engine_image\":\"${ENGINE_IMAGE}\",\"containerd_min_version\":\"1.2.0-beta.1\",\"runtime\":\"host_install\"}"
ENTRYPOINT ["/bin/dockerd"]

View File

@ -1,97 +0,0 @@
# Common builder
ARG GO_IMAGE
ARG BASE_IMAGE=centos:7
FROM ${GO_IMAGE} as golang
FROM ${BASE_IMAGE} as builder
ENV GOPATH=/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
COPY --from=golang /usr/local/go /usr/local/go
COPY hack/dockerfile/install/tini.installer /
COPY hack/dockerfile/install/proxy.installer /
RUN yum install -y \
bash \
ca-certificates \
cmake \
gcc \
git \
glibc-static \
libtool \
make
RUN grep "_COMMIT=" /*.installer |cut -f2- -d: > /binaries-commits
# dockerd
FROM builder as dockerd-builder
RUN yum install -y \
btrfs-progs-devel \
device-mapper-devel \
libseccomp-devel \
selinux-policy-devel \
systemd-devel
WORKDIR /go/src/github.com/docker/docker
COPY . /go/src/github.com/docker/docker
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG PRODUCT
ARG DEFAULT_PRODUCT_LICENSE
ENV VERSION ${VERSION}
ENV GITCOMMIT ${GITCOMMIT}
ENV BUILDTIME ${BUILDTIME}
ENV PLATFORM ${PLATFORM}
ENV PRODUCT ${PRODUCT}
ENV DEFAULT_PRODUCT_LICENSE ${DEFAULT_PRODUCT_LICENSE}
# TODO The way we set the version could easily be simplified not to depend on hack/...
RUN bash ./hack/make/.go-autogen
RUN go build -o /dockerd \
-tags 'autogen apparmor seccomp selinux journald' \
-i \
-buildmode=pie \
-a -ldflags '-w'\
github.com/docker/docker/cmd/dockerd
# docker-proxy
# TODO if libnetwork folds into the docker tree this can be combined above
FROM builder as proxy-builder
RUN git clone https://github.com/docker/libnetwork.git /go/src/github.com/docker/libnetwork
WORKDIR /go/src/github.com/docker/libnetwork
RUN . /binaries-commits && \
git checkout -q "$LIBNETWORK_COMMIT" && \
go build -buildmode=pie -ldflags="-w" \
-o /docker-proxy \
github.com/docker/libnetwork/cmd/proxy
# docker-init - TODO move this out, last time we bumped was 2016!
FROM builder as init-builder
RUN git clone https://github.com/krallin/tini.git /tini
WORKDIR /tini
RUN . /binaries-commits && \
git checkout -q "$TINI_COMMIT" && \
cmake . && make tini-static && \
cp tini-static /docker-init
# Final docker image
FROM scratch
ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME
ARG PLATFORM
ARG ENGINE_IMAGE
COPY --from=dockerd-builder /dockerd /bin/
COPY --from=proxy-builder /docker-proxy /bin/
COPY --from=init-builder /docker-init /bin/
LABEL \
org.opencontainers.image.authors="Docker Inc." \
org.opencontainers.image.created="${BUILDTIME}" \
org.opencontainers.image.documentation="https://docs.docker.com/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.revision="${GITCOMMIT}" \
org.opencontainers.image.url="https://www.docker.com/products/docker-engine" \
org.opencontainers.image.vendor="Docker Inc." \
org.opencontainers.image.version="${VERSION}" \
com.docker.distribution_based_engine="{\"platform\":\"${PLATFORM}\",\"engine_image\":\"${ENGINE_IMAGE}\",\"containerd_min_version\":\"1.2.0-beta.1\",\"runtime\":\"host_install\"}"
ENTRYPOINT ["/bin/dockerd"]

View File

@ -1,90 +0,0 @@
SHELL:=/bin/bash
ENGINE_DIR:=$(CURDIR)/../../engine
CLI_DIR:=$(CURDIR)/../../cli
VERSION?=0.0.0-dev
GO_BASE_IMAGE=golang
GO_VERSION:=1.12.4
ENGINE_GO_IMAGE=$(GO_BASE_IMAGE):$(GO_VERSION)
STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION))
DOCKER_HUB_ORG?=dockereng
ARCH=$(shell uname -m)
ENGINE_IMAGE?=engine-community
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
DEFAULT_PRODUCT_LICENSE?=Community Engine
PLATFORM?=Docker Engine - Community
BUILDTIME?=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
IMAGE_WITH_TAG=$(DOCKER_HUB_ORG)/$(ENGINE_IMAGE):$(STATIC_VERSION)
ifdef BASE_IMAGE
# TODO: Clean this up to only set ENGINE_GO_IMAGE
BASE_IMAGE_FLAG=--build-arg BASE_IMAGE=$(BASE_IMAGE)
ENGINE_GO_IMAGE=$(BASE_IMAGE)
endif
IMAGE_BUILD?=docker build -t $(IMAGE_WITH_TAG) \
--build-arg GO_IMAGE="$(ENGINE_GO_IMAGE)" \
--build-arg VERSION="$(STATIC_VERSION)" \
--build-arg GITCOMMIT="$$(cd $(ENGINE_DIR) && git rev-parse --short=7 HEAD)" \
--build-arg BUILDTIME="$(BUILDTIME)" \
--build-arg PLATFORM="$(PLATFORM)" \
--build-arg PRODUCT="$(PRODUCT)" \
--build-arg ENGINE_IMAGE="$(ENGINE_IMAGE)" \
--build-arg DEFAULT_PRODUCT_LICENSE="$(DEFAULT_PRODUCT_LICENSE)" \
$(BASE_IMAGE_FLAG) \
--file $< $(ENGINE_DIR)
.PHONY: help
help: ## show make targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: clean
clean: ## remove build artifacts
-$(RM) $(ENGINE_DIR)/Dockerfile.engine
-$(RM) $(ENGINE_DIR)/Dockerfile.engine-dm
-docker rmi $(IMAGE_WITH_TAG)
-docker rmi $(IMAGE_WITH_TAG)-dm
-rm -f image-linux
-$(RM) -r artifacts
-$(RM) *.tar
.PHONY: image
image: image-linux
$(ENGINE_DIR)/Dockerfile.%: Dockerfile.%
cp $< $@
DOCKER2OCI=artifacts/docker2oci
$(DOCKER2OCI):
-$(CHOWN) -R $(shell id -u):$(shell id -g) $(@D)
docker run --name docker2oci $(ENGINE_GO_IMAGE) sh -c 'go get github.com/coolljt0725/docker2oci'
mkdir -p $(@D)
docker cp docker2oci:/go/bin/docker2oci "$@"
docker rm -f docker2oci
$(CHOWN) -R $(shell id -u):$(shell id -g) $(@D)
# builds across multiple archs because the base images
# utilize manifests
image-linux: $(ENGINE_DIR)/Dockerfile.engine
$(IMAGE_BUILD)
echo $(IMAGE_WITH_TAG) > $@
engine-$(ARCH).tar: engine-$(ARCH)-docker-compat.tar $(DOCKER2OCI)
mkdir -p artifacts
./$(DOCKER2OCI) -i $< artifacts/engine-image
mkdir -p $(@D)
tar c -C artifacts/engine-image . > $@
engine-$(ARCH)-docker-compat.tar: image-linux
docker save -o $@ $$(cat $<)
image-linux-dm: ENGINE_IMAGE:=$(ENGINE_IMAGE)-dm
image-linux-dm: $(ENGINE_DIR)/Dockerfile.engine-dm
$(IMAGE_BUILD)
echo $(IMAGE_WITH_TAG) > $@
engine-$(ARCH)-dm.tar: engine-$(ARCH)-dm-docker-compat.tar $(DOCKER2OCI)
mkdir -p artifacts
./$(DOCKER2OCI) -i $< artifacts/engine-image
mkdir -p $(@D)
tar c -C artifacts/engine-image . > $@
engine-$(ARCH)-dm-docker-compat.tar: image-linux-dm
docker save -o $@ $$(cat $<)

View File

@ -0,0 +1,85 @@
#!/usr/bin/env bash
###
# Script Name: install-containerd-helpers
#
# Description: A library that containers helpers to install containerd on different
# distributions based on a package manager
###
set -x extglob
# Steps taken from: https://docs.docker.com/install/linux/docker-ce/centos/
function install_rpm_containerd() {
if [ "${PACKAGE_REPO}" = "stage" ]; then
REPO_URL="https://download-stage.docker.com/linux/${DIST_ID}/docker-ce-staging.repo"
else
REPO_URL="https://download.docker.com/linux/${DIST_ID}/docker-ce.repo"
fi
# Install containerd dependency for non-zypper dependecies
echo "[DEBUG] Installing engine dependencies from ${REPO_URL}"
# Note: we enable test channel to be able to test non-stable containerd packages as well.
# Once a containerd package becomes stable it will also be available in the test channel,
# so this logic works for both cases.
# (See also same logic in install_debian_containerd)
if command -v dnf5; then
dnf --version
# FIXME(thaJeztah); strip empty lines as workaround for https://github.com/rpm-software-management/dnf5/issues/1603
TMP_REPO_FILE="$(mktemp --dry-run)"
curl -fsSL "${REPO_URL}" | tr -s '\n' > "${TMP_REPO_FILE}"
dnf config-manager addrepo --save-filename=docker-ce.repo --overwrite --from-repofile="${TMP_REPO_FILE}"
rm -f "${TMP_REPO_FILE}"
# dnf config-manager addrepo --save-filename=docker-ce.repo --from-repofile="${REPO_URL}"
dnf config-manager setopt 'docker-ce-*.enabled=0'
dnf config-manager setopt 'docker-ce-test.enabled=1'
dnf makecache
elif command -v dnf; then
dnf --version
dnf config-manager --add-repo "${REPO_URL}"
dnf config-manager --set-disabled 'docker-ce-*'
dnf config-manager --set-enabled 'docker-ce-test'
dnf makecache
else
yum-config-manager --add-repo "${REPO_URL}"
yum-config-manager --disable 'docker-ce-*'
yum-config-manager --enable 'docker-ce-test'
yum makecache
fi
}
# Steps taken from: https://docs.docker.com/install/linux/docker-ce/ubuntu/
function install_debian_containerd() {
if [ "${PACKAGE_REPO}" = "stage" ]; then
REPO_URL="https://download-stage.docker.com/linux/${DIST_ID}"
else
REPO_URL="https://download.docker.com/linux/${DIST_ID}"
fi
echo "[DEBUG] Installing engine dependencies from ${REPO_URL}"
#TODO include this step in the get.docker.com installation script
# Make sure ca-certificates are up-to-date
update-ca-certificates -f
install -m 0755 -d /etc/apt/keyrings
curl -fsSL "${REPO_URL}/gpg" | tee /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
if [ "${DIST_VERSION}" = "sid" ]; then
echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename'
exit 1
fi
ARCH=$(dpkg --print-architecture)
# Note: we enable test channel to be able to test non-stable containerd packages as well.
# Once a containerd package becomes stable it will also be available in the test channel,
# so this logic works for both cases.
# (See also same logic in install_rpm_containerd)
echo "deb [arch=${ARCH} signed-by=/etc/apt/keyrings/docker.asc] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list
apt-get update
}

View File

@ -1,37 +0,0 @@
#!/usr/bin/env bash
DESTDIR=${DESTDIR:-}
PREFIX=${PREFIX:-/usr/local}
add_github_ssh_host() {
# You're not able to clone from github unless you add to known_hosts
if ! grep ~/.ssh/known_hosts "github.com" >/dev/null 2>/dev/null; then
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
fi
}
install_binary() {
for binary in "$@"; do
mkdir -p "${DESTDIR}${PREFIX}"
install -p -m 755 "${binary}" "${DESTDIR}${PREFIX}"
done
}
build_or_install() {
case $1 in
build)
build
;;
build_mac)
build_mac
;;
install_plugin)
install_plugin
;;
*)
echo "Are you sure that's a command? o.O"
exit 1
;;
esac
}

View File

View File

@ -1,32 +0,0 @@
#!/usr/bin/env bash
set -e
source "$(dirname "$0")/.common"
GOPATH=$(go env GOPATH)
REPO=https://github.com/docker/app.git
COMMIT=v0.8.0-beta1
DEST=${GOPATH}/src/github.com/docker/app
build() {
if [ ! -d "${DEST}" ]; then
git clone "${REPO}" "${DEST}"
fi
(
cd "${DEST}"
git fetch --all
git checkout -q "${COMMIT}"
# There's no real versions yet, but this'll just leave it blank
make dynamic
)
}
install_plugin() {
(
cd "${DEST}"
install_binary bin/docker-app
)
}
build_or_install "$@"

View File

@ -1,48 +1,75 @@
include ../containerd.mk
include ../common.mk
ARCH=$(shell uname -m)
ENGINE_DIR:=$(CURDIR)/../../engine
CLI_DIR:=$(CURDIR)/../../cli
GITCOMMIT=$(shell cd $(ENGINE_DIR) && git rev-parse --short HEAD)
VERSION?=0.0.0-dev
STATIC_VERSION=$(shell ../static/gen-static-ver $(ENGINE_DIR) $(VERSION))
PLUGINS_DIR=$(realpath $(CURDIR)/../plugins)
GO_BASE_IMAGE=golang
GO_VERSION:=1.12.4
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)
GEN_RPM_VER=$(shell ./gen-rpm-ver $(CLI_DIR) $(VERSION))
CHOWN=docker run --rm -i -v $(CURDIR):/v -w /v alpine chown
GO_IMAGE?=$(GO_BASE_IMAGE):$(GO_VERSION)-bookworm
GEN_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/cli) "$(VERSION)")
GEN_BUILDX_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/buildx) "$(DOCKER_BUILDX_REF)")
GEN_COMPOSE_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/compose) "$(DOCKER_COMPOSE_REF)")
GEN_MODEL_RPM_VER=$(shell ./gen-rpm-ver $(realpath $(CURDIR)/../src/github.com/docker/model-cli) "$(DOCKER_MODEL_REF)")
CLI_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/cli) && git rev-parse --short HEAD)
ENGINE_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/docker) && git rev-parse --short HEAD)
BUILDX_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/buildx) && git rev-parse --short HEAD)
DOCKERFILE=Dockerfile
ifdef NEEDS_ARCH_SPECIFIC
DOCKERFILE=Dockerfile.$(ARCH)
ifdef RH_USER
RH_FLAGS=--secret id=rh-user,env=RH_USER --secret id=rh-pass,env=RH_PASS
endif
ifdef BUILD_IMAGE
BUILD_IMAGE_FLAG=--build-arg $(BUILD_IMAGE)
endif
BUILD?=docker build \
BUILD?=DOCKER_BUILDKIT=1 \
docker build \
$(RH_FLAGS) \
$(BUILD_IMAGE_FLAG) \
--build-arg GO_IMAGE=$(GO_IMAGE) \
-t rpmbuild-$@/$(ARCH) \
-f $@/$(DOCKERFILE) \
--platform linux/$(ARCH) \
-f $@/Dockerfile \
.
SPEC_FILES?=docker-ce.spec docker-ce-cli.spec
SPEC_FILES?=docker-ce.spec docker-ce-cli.spec docker-ce-rootless-extras.spec docker-buildx-plugin.spec docker-compose-plugin.spec docker-model-plugin.spec
SPECS?=$(addprefix SPECS/, $(SPEC_FILES))
RPMBUILD=docker run --privileged --rm -i \
-e PLATFORM \
-v $(CURDIR)/rpmbuild/SOURCES:/root/rpmbuild/SOURCES \
-v $(CURDIR)/rpmbuild/RPMS:/root/rpmbuild/RPMS \
-v $(CURDIR)/rpmbuild/SRPMS:/root/rpmbuild/SRPMS
RPMBUILD_FLAGS?=-ba\
--define '_gitcommit $(word 3,$(GEN_RPM_VER))' \
--define '_gitcommit_cli $(CLI_GITCOMMIT)' \
--define '_gitcommit_engine $(ENGINE_GITCOMMIT)' \
--define '_release $(word 2,$(GEN_RPM_VER))' \
--define '_version $(word 1,$(GEN_RPM_VER))' \
--define '_origversion $(word 4, $(GEN_RPM_VER))' \
--define '_buildx_rpm_version $(word 1,$(GEN_BUILDX_RPM_VER))' \
--define '_buildx_version $(word 4,$(GEN_BUILDX_RPM_VER))' \
--define '_buildx_gitcommit $(BUILDX_GITCOMMIT)' \
--define '_compose_rpm_version $(word 1,$(GEN_COMPOSE_RPM_VER))' \
--define '_compose_version $(word 4,$(GEN_COMPOSE_RPM_VER))' \
--define '_model_rpm_version $(word 1,$(GEN_MODEL_RPM_VER))' \
--define '_model_version $(word 4,$(GEN_MODEL_RPM_VER))' \
$(RPMBUILD_EXTRA_FLAGS) \
$(SPECS)
RUN?=$(RPMBUILD) rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
SOURCE_FILES=engine-image engine.tgz cli.tgz docker.service docker.socket distribution_based_engine.json plugin-installers.tgz
SOURCES=$(addprefix rpmbuild/SOURCES/, $(SOURCE_FILES))
# Additional flags may be necessary at some point
RUN_FLAGS=
# FIXME(thaJeztah): disabling seccomp to handle (ppc64le) tar "chown / chmod"
# failing when running in a Fedora 40 container on a Debian bookworm host;
# see https://github.com/docker/docker-ce-packaging/issues/1012 and
# https://github.com/docker/docker-ce-packaging/pull/1006#issuecomment-2006878743
RUN?=docker run --rm \
--security-opt seccomp=unconfined \
--platform linux/$(ARCH) \
-e PLATFORM \
-v $(CURDIR)/rpmbuild/SOURCES:/root/rpmbuild/SOURCES:ro \
-v $(CURDIR)/rpmbuild/$@/RPMS:/root/rpmbuild/RPMS \
-v $(CURDIR)/rpmbuild/$@/SRPMS:/root/rpmbuild/SRPMS \
$(RUN_FLAGS) \
rpmbuild-$@/$(ARCH) $(RPMBUILD_FLAGS)
FEDORA_RELEASES ?= fedora-41 fedora-42
CENTOS_RELEASES ?= centos-9 centos-10
RHEL_RELEASES ?= rhel-8 rhel-9
DISTROS := $(FEDORA_RELEASES) $(CENTOS_RELEASES) $(RHEL_RELEASES)
BUNDLES := $(patsubst %,rpmbuild/bundles-ce-%-$(DPKG_ARCH).tar.gz,$(DISTROS))
.PHONY: help
help: ## show make targets
@ -52,77 +79,73 @@ help: ## show make targets
clean: ## remove build artifacts
[ ! -d rpmbuild ] || $(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild
$(RM) -r rpmbuild/
[ ! -d artifacts ] || $(CHOWN) -R $(shell id -u):$(shell id -g) artifacts
$(RM) -r artifacts/
[ ! -d tmp ] || $(CHOWN) -R $(shell id -u):$(shell id -g) tmp
$(RM) -r tmp/
-docker rm docker2oci
$(MAKE) -C ../image clean
-docker builder prune -f --filter until=24h
.PHONY: rpm
rpm: fedora centos ## build all rpm packages
.PHONY: fedora
fedora: fedora-30 fedora-29 fedora-28 ## build all fedora rpm packages
fedora: $(FEDORA_RELEASES) ## build all fedora rpm packages
.PHONY: centos
centos: centos-7 ## build all centos rpm packages
centos: $(CENTOS_RELEASES) ## build all centos rpm packages
.PHONY: fedora-%
fedora-%: ## build fedora rpm packages
fedora-%: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
.PHONY: rhel
rhel: $(RHEL_RELEASES) ## build all rhel rpm packages
.PHONY: $(DISTROS)
$(DISTROS): sources
@echo "== Building packages for $@ =="
mkdir -p "rpmbuild/$@"
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild
$(CHOWN) -R $(shell id -u):$(shell id -g) "rpmbuild/$@"
.PHONY: centos-7
centos-7: ## build centos-7 rpm packages
centos-7: $(SOURCES)
$(CHOWN) -R root:root rpmbuild
$(BUILD)
$(RUN)
$(CHOWN) -R $(shell id -u):$(shell id -g) rpmbuild
.PHONY: sources
sources: rpmbuild/SOURCES/engine.tgz rpmbuild/SOURCES/cli.tgz rpmbuild/SOURCES/buildx.tgz rpmbuild/SOURCES/compose.tgz rpmbuild/SOURCES/model.tgz
rpmbuild/SOURCES/engine.tgz:
mkdir -p rpmbuild/SOURCES
docker run --rm -i -w /v \
-v $(ENGINE_DIR):/engine \
-v $(CURDIR)/rpmbuild/SOURCES:/v \
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/docker):/engine \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/engine.tgz --exclude .git engine
rpmbuild/SOURCES/cli.tgz:
mkdir -p rpmbuild/SOURCES
docker run --rm -i -w /v \
-v $(CLI_DIR):/cli \
-v $(CURDIR)/rpmbuild/SOURCES:/v \
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/cli):/cli \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/cli.tgz --exclude .git cli
rpmbuild/SOURCES/docker.service: ../systemd/docker.service
rpmbuild/SOURCES/buildx.tgz:
mkdir -p $(@D)
cp $< $@
rpmbuild/SOURCES/docker.socket: ../systemd/docker.socket
mkdir -p $(@D)
cp $< $@
# TODO: Figure out how to decouple this
# TODO: These might just end up being static files that are hardcoded
# TODO: FROM HERE <=====================
rpmbuild/SOURCES/engine-image:
mkdir -p $(@D)
echo "docker.io/dockereng/engine-community-dm:$(STATIC_VERSION)" > $@
rpmbuild/SOURCES/distribution_based_engine.json: rpmbuild/SOURCES/engine-image
mkdir -p $(@D)
echo '{"platform":"Docker Engine - Community","engine_image":"engine-community-dm","containerd_min_version":"1.2.0-beta.1","runtime":"host_install"}' > $@
# TODO: TO HERE <=====================
rpmbuild/SOURCES/plugin-installers.tgz: $(wildcard ../plugins/*)
docker run --rm -i -w /v \
-v $(shell readlink -e ../plugins):/plugins \
-v $(CURDIR)/rpmbuild/SOURCES:/v \
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/buildx):/buildx \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/plugin-installers.tgz --exclude .git plugins
tar -C / -c -z -f /v/buildx.tgz --exclude .git buildx
rpmbuild/SOURCES/compose.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/compose):/compose \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/compose.tgz --exclude .git compose
rpmbuild/SOURCES/model.tgz:
mkdir -p $(@D)
docker run --rm -w /v \
-v $(realpath $(CURDIR)/../src/github.com/docker/model-cli):/model \
-v $(CURDIR)/$(@D):/v \
alpine \
tar -C / -c -z -f /v/model.tgz --exclude .git model
# See ARCHES in common.mk. Could not figure out how to match both distro and arch.
BUNDLES:=$(addsuffix .tar.gz,$(addprefix rpmbuild/bundles-ce-%-,$(ARCHES)))
$(BUNDLES): %
tar czf $@ --transform="s|^rpmbuild/\(.*\)|bundles/$(VERSION)/build-rpm/\1|" rpmbuild/$*

View File

@ -3,30 +3,37 @@
`.rpm` packages can be built from this directory with the following syntax
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli rpm
make rpm
```
Artifacts will be located in `rpmbuild` under the following directory structure:
`rpmbuild/$distro-$distro_version/`
### NOTES:
### Building from local source
Specify the location of the source repositories for the engine and cli when
building packages
* `ENGINE_DIR` -> Specifies the directory where the engine code is located, eg: `$GOPATH/src/github.com/docker/docker`
* `CLI_DIR` -> Specifies the directory where the cli code is located, eg: `$GOPATH/src/github.com/docker/cli`
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli rpm
```
## Specifying a specific distro
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli fedora
make centos
```
## Specifying a specific distro version
```shell
make ENGINE_DIR=/path/to/engine CLI_DIR=/path/to/cli fedora-25
make centos-9
```
## Building the latest docker-ce
## Building the for all distros
```shell
git clone https://github.com/docker/docker-ce.git
make ENGINE_DIR=docker-ce/components/engine CLI_DIR=docker-ce/components/cli rpm
make rpm
```

View File

@ -0,0 +1,51 @@
%global debug_package %{nil}
Name: docker-buildx-plugin
Version: %{_buildx_rpm_version}
Release: %{_release}%{?dist}
Epoch: 0
Source0: buildx.tgz
Summary: Docker Buildx plugin for the Docker CLI
Group: Tools/Docker
License: Apache-2.0
URL: https://github.com/docker/buildx
Vendor: Docker
Packager: Docker <support@docker.com>
BuildRequires: bash
%description
Docker Buildx plugin for the Docker CLI.
%prep
%setup -q -c -n src -a 0
%build
pushd ${RPM_BUILD_DIR}/src/buildx
GO111MODULE=on \
CGO_ENABLED=0 \
go build \
-mod=vendor \
-trimpath \
-ldflags="-w -X github.com/docker/buildx/version.Version=%{_buildx_version} -X github.com/docker/buildx/version.Revision=%{_buildx_gitcommit} -X github.com/docker/buildx/version.Package=github.com/docker/buildx" \
-o "bin/docker-buildx" \
./cmd/buildx
popd
%check
ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-buildx docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \
test "$ver" = "%{_buildx_version}" && echo "PASS: docker-buildx version OK" || (echo "FAIL: docker-buildx version ($ver) did not match" && exit 1)
%install
install -D -p -m 0755 ${RPM_BUILD_DIR}/src/buildx/bin/docker-buildx ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-buildx
%files
%{_libexecdir}/docker/cli-plugins/docker-buildx
%post
%preun
%postun
%changelog

View File

@ -6,24 +6,27 @@ Release: %{_release}%{?dist}
Epoch: 1
Summary: The open-source application container engine
Group: Tools/Docker
License: ASL 2.0
License: Apache-2.0
Source0: cli.tgz
Source1: plugin-installers.tgz
URL: https://www.docker.com
Vendor: Docker
Packager: Docker <support@docker.com>
# required packages on install
Requires: /bin/sh
Requires: /usr/sbin/groupadd
Recommends: docker-buildx-plugin
Recommends: docker-compose-plugin
Suggests: docker-model-plugin
BuildRequires: make
BuildRequires: libtool-ltdl-devel
BuildRequires: git
# conflicting packages
Conflicts: docker
Conflicts: docker-io
Conflicts: docker-engine-cs
Conflicts: docker-ee
Conflicts: docker-ee-cli
@ -32,81 +35,56 @@ Docker is is a product for you to build, ship and run any application as a
lightweight container.
Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest cloud compute instance and
everything in between - and they don't require you to use a particular
they can run anywhere, from your laptop to the largest cloud compute instance
and everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
%prep
%setup -q -c -n src -a 1
%setup -q -c -n src -a 0
%build
mkdir -p /go/src/github.com/docker
rm -f /go/src/github.com/docker/cli
ln -s /root/rpmbuild/BUILD/src/cli /go/src/github.com/docker/cli
pushd /go/src/github.com/docker/cli
DISABLE_WARN_OUTSIDE_CONTAINER=1 make VERSION=%{_origversion} GITCOMMIT=%{_gitcommit} dynbinary manpages # cli
popd
ln -snf ${RPM_BUILD_DIR}/src/cli /go/src/github.com/docker/cli
make -C /go/src/github.com/docker/cli DISABLE_WARN_OUTSIDE_CONTAINER=1 VERSION=%{_origversion} GITCOMMIT=%{_gitcommit_cli} dynbinary manpages shell-completion
# Build all associated plugins
pushd /root/rpmbuild/BUILD/src/plugins
for installer in *.installer; do
bash ${installer} build
done
popd
# %check
# cli/build/docker -v
%check
ver="$(cli/build/docker --version)"; \
test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_cli}" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($ver) did not match" && exit 1)
%install
# install binary
install -d $RPM_BUILD_ROOT/%{_bindir}
install -p -m 755 cli/build/docker $RPM_BUILD_ROOT/%{_bindir}/docker
# install plugins
pushd /root/rpmbuild/BUILD/src/plugins
for installer in *.installer; do
DESTDIR=$RPM_BUILD_ROOT \
PREFIX=/usr/libexec/docker/cli-plugins \
bash ${installer} install_plugin
done
popd
install -D -p -m 755 cli/build/docker ${RPM_BUILD_ROOT}%{_bindir}/docker
# add bash, zsh, and fish completions
install -d $RPM_BUILD_ROOT/usr/share/bash-completion/completions
install -d $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions
install -d $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d
install -p -m 644 cli/contrib/completion/bash/docker $RPM_BUILD_ROOT/usr/share/bash-completion/completions/docker
install -p -m 644 cli/contrib/completion/zsh/_docker $RPM_BUILD_ROOT/usr/share/zsh/vendor-completions/_docker
install -p -m 644 cli/contrib/completion/fish/docker.fish $RPM_BUILD_ROOT/usr/share/fish/vendor_completions.d/docker.fish
install -D -p -m 644 cli/build/completion/bash/docker ${RPM_BUILD_ROOT}%{_datadir}/bash-completion/completions/docker
install -D -p -m 644 cli/build/completion/zsh/_docker ${RPM_BUILD_ROOT}%{_datadir}/zsh/vendor-completions/_docker
install -D -p -m 644 cli/build/completion/fish/docker.fish ${RPM_BUILD_ROOT}%{_datadir}/fish/vendor_completions.d/docker.fish
# install manpages
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 cli/man/man1/*.1 $RPM_BUILD_ROOT/%{_mandir}/man1
install -d %{buildroot}%{_mandir}/man5
install -p -m 644 cli/man/man5/*.5 $RPM_BUILD_ROOT/%{_mandir}/man5
install -d %{buildroot}%{_mandir}/man8
install -p -m 644 cli/man/man8/*.8 $RPM_BUILD_ROOT/%{_mandir}/man8
# install man-pages
for sec in $(seq 1 9); do
if [ -d "cli/man/man${sec}" ]; then
# Note: we need to create destination dirs first (instead "install -D") due to wildcards used.
install -d ${RPM_BUILD_ROOT}%{_mandir}/man${sec} && \
install -p -m 644 cli/man/man${sec}/*.${sec} ${RPM_BUILD_ROOT}%{_mandir}/man${sec};
fi
done
mkdir -p build-docs
for cli_file in LICENSE MAINTAINERS NOTICE README.md; do
cp "cli/$cli_file" "build-docs/$cli_file"
install -D -p -m 644 "cli/$cli_file" "build-docs/$cli_file"
done
# list files owned by the package here
%files
%doc build-docs/LICENSE build-docs/MAINTAINERS build-docs/NOTICE build-docs/README.md
/%{_bindir}/docker
/usr/libexec/docker/cli-plugins/*
/usr/share/bash-completion/completions/docker
/usr/share/zsh/vendor-completions/_docker
/usr/share/fish/vendor_completions.d/docker.fish
%doc
/%{_mandir}/man1/*
/%{_mandir}/man5/*
/%{_mandir}/man8/*
%{_bindir}/docker
%{_datadir}/bash-completion/completions/docker
%{_datadir}/zsh/vendor-completions/_docker
%{_datadir}/fish/vendor_completions.d/docker.fish
%{_mandir}/man*/*
%post

View File

@ -0,0 +1,63 @@
%global debug_package %{nil}
Name: docker-ce-rootless-extras
Version: %{_version}
Release: %{_release}%{?dist}
Epoch: 0
Source0: engine.tgz
Summary: Rootless support for Docker
Group: Tools/Docker
License: Apache-2.0
URL: https://docs.docker.com/engine/security/rootless/
Vendor: Docker
Packager: Docker <support@docker.com>
Requires: docker-ce
# TODO: conditionally add `Requires: dbus-daemon` for Fedora and CentOS 8
# slirp4netns >= 0.4 is available in the all supported versions of CentOS and Fedora.
Requires: slirp4netns >= 0.4
# fuse-overlayfs >= 0.7 is available in the all supported versions of CentOS and Fedora.
Requires: fuse-overlayfs >= 0.7
BuildRequires: bash
# conflicting packages
Conflicts: rootlesskit
%description
Rootless support for Docker.
Use dockerd-rootless.sh to run the daemon.
Use dockerd-rootless-setuptool.sh to setup systemd for dockerd-rootless.sh .
This package contains RootlessKit, but does not contain VPNKit.
Either VPNKit or slirp4netns (>= 0.4.0) needs to be installed separately.
%prep
%setup -q -c -n src -a 0
%build
export DOCKER_GITCOMMIT=%{_gitcommit_engine}
mkdir -p /go/src/github.com/docker
ln -snf ${RPM_BUILD_DIR}/src/engine /go/src/github.com/docker/docker
TMP_GOPATH="/go" ${RPM_BUILD_DIR}/src/engine/hack/dockerfile/install/install.sh rootlesskit dynamic
%check
/usr/local/bin/rootlesskit -v
%install
install -D -p -m 0755 engine/contrib/dockerd-rootless.sh ${RPM_BUILD_ROOT}%{_bindir}/dockerd-rootless.sh
install -D -p -m 0755 engine/contrib/dockerd-rootless-setuptool.sh ${RPM_BUILD_ROOT}%{_bindir}/dockerd-rootless-setuptool.sh
install -D -p -m 0755 /usr/local/bin/rootlesskit ${RPM_BUILD_ROOT}%{_bindir}/rootlesskit
%files
%{_bindir}/dockerd-rootless.sh
%{_bindir}/dockerd-rootless-setuptool.sh
%{_bindir}/rootlesskit
%post
%preun
%postun
%changelog

View File

@ -1,71 +1,58 @@
%global debug_package %{nil}
Name: docker-ce
Version: %{_version}
Release: %{_release}%{?dist}
Epoch: 3
Source0: engine.tgz
Source1: docker.service
Source2: docker.socket
Summary: The open-source application container engine
Group: Tools/Docker
License: ASL 2.0
License: Apache-2.0
URL: https://www.docker.com
Vendor: Docker
Packager: Docker <support@docker.com>
Requires: /usr/sbin/groupadd
# Provides modprobe, which we use to load br_netfilter if not loaded.
Suggests: kmod
Requires: docker-ce-cli
Requires: container-selinux >= 2.9
Requires: libseccomp >= 2.3
Requires: systemd-units
Recommends: docker-ce-rootless-extras
Requires: container-selinux
Requires: systemd
Requires: iptables
%if %{undefined rhel} || 0%{?rhel} < 9
# Libcgroup is no longer available in RHEL/CentOS >= 9 distros.
Requires: libcgroup
Requires: containerd.io
%endif
Requires: containerd.io >= 1.7.27
Requires: tar
Requires: xz
# Resolves: rhbz#1165615
Requires: device-mapper-libs >= 1.02.90-1
BuildRequires: bash
BuildRequires: btrfs-progs-devel
BuildRequires: ca-certificates
BuildRequires: cmake
BuildRequires: device-mapper-devel
BuildRequires: gcc
BuildRequires: git
BuildRequires: glibc-static
BuildRequires: libseccomp-devel
BuildRequires: libselinux-devel
BuildRequires: libtool
BuildRequires: libtool-ltdl-devel
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: pkgconfig(systemd)
BuildRequires: selinux-policy-devel
BuildRequires: systemd-devel
BuildRequires: tar
BuildRequires: which
# conflicting packages
Conflicts: docker
Conflicts: docker-io
Conflicts: docker-engine-cs
Conflicts: docker-ee
# Obsolete packages
Obsoletes: docker-ce-selinux
Obsoletes: docker-engine-selinux
Obsoletes: docker-engine
%description
Docker is is a product for you to build, ship and run any application as a
Docker is a product for you to build, ship and run any application as a
lightweight container.
Docker containers are both hardware-agnostic and platform-agnostic. This means
they can run anywhere, from your laptop to the largest cloud compute instance and
everything in between - and they don't require you to use a particular
they can run anywhere, from your laptop to the largest cloud compute instance
and everything in between - and they don't require you to use a particular
language, framework or packaging system. That makes them great building blocks
for deploying and scaling web apps, databases, and backend services without
depending on a particular stack or provider.
@ -74,81 +61,67 @@ depending on a particular stack or provider.
%setup -q -c -n src -a 0
%build
export DOCKER_GITCOMMIT=%{_gitcommit}
mkdir -p /go/src/github.com/docker
ln -s /root/rpmbuild/BUILD/src/engine /go/src/github.com/docker/docker
pushd engine
for component in tini "proxy dynamic";do
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
done
VERSION=%{_origversion} PRODUCT=docker hack/make.sh dynbinary
export DOCKER_GITCOMMIT=%{_gitcommit_engine}
mkdir -p /go/src/github.com/docker
ln -snf ${RPM_BUILD_DIR}/src/engine /go/src/github.com/docker/docker
pushd ${RPM_BUILD_DIR}/src/engine
TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
# Determine Go module mode based on file presence
if [ -f vendor.mod ]; then
GOMOD=off
elif [ -f go.mod ]; then
GOMOD=on
else
echo "No go.mod or vendor.mod found in engine directory"
exit 1
fi
GO111MODULE=$GOMOD VERSION=%{_origversion} PRODUCT=docker hack/make.sh dynbinary
popd
# build man-pages
make -C ${RPM_BUILD_DIR}/src/engine/man
%check
engine/bundles/dynbinary-daemon/dockerd -v
ver="$(engine/bundles/dynbinary-daemon/dockerd --version)"; \
test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_engine}" && echo "PASS: daemon version OK" || (echo "FAIL: daemon version ($ver) did not match" && exit 1)
%install
# install daemon binary
install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) $RPM_BUILD_ROOT/%{_bindir}/dockerd
# install proxy
install -D -p -m 0755 /usr/local/bin/docker-proxy $RPM_BUILD_ROOT/%{_bindir}/docker-proxy
# install tini
install -D -p -m 755 /usr/local/bin/docker-init $RPM_BUILD_ROOT/%{_bindir}/docker-init
install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) ${RPM_BUILD_ROOT}%{_bindir}/dockerd
install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/docker-proxy) ${RPM_BUILD_ROOT}%{_bindir}/docker-proxy
install -D -p -m 0755 /usr/local/bin/docker-init ${RPM_BUILD_ROOT}%{_libexecdir}/docker/docker-init
# install systemd scripts
install -D -m 0644 %{_topdir}/SOURCES/docker.service $RPM_BUILD_ROOT/%{_unitdir}/docker.service
install -D -m 0644 %{_topdir}/SOURCES/docker.socket $RPM_BUILD_ROOT/%{_unitdir}/docker.socket
install -D -p -m 0644 engine/contrib/init/systemd/docker.service ${RPM_BUILD_ROOT}%{_unitdir}/docker.service
install -D -p -m 0644 engine/contrib/init/systemd/docker.socket ${RPM_BUILD_ROOT}%{_unitdir}/docker.socket
# install json for docker engine activate / upgrade
install -D -m 0644 %{_topdir}/SOURCES/distribution_based_engine.json $RPM_BUILD_ROOT/var/lib/docker-engine/distribution_based_engine-ce.json
# install manpages
make -C ${RPM_BUILD_DIR}/src/engine/man DESTDIR=${RPM_BUILD_ROOT} mandir=%{_mandir} install
# create the config directory
mkdir -p ${RPM_BUILD_ROOT}/etc/docker
%files
/%{_bindir}/dockerd
/%{_bindir}/docker-proxy
/%{_bindir}/docker-init
/%{_unitdir}/docker.service
/%{_unitdir}/docker.socket
/var/lib/docker-engine/distribution_based_engine-ce.json
%pre
if [ $1 -gt 0 ] ; then
# package upgrade scenario, before new files are installed
# clear any old state
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
# check if docker service is running
if systemctl is-active docker > /dev/null 2>&1; then
systemctl stop docker > /dev/null 2>&1 || :
touch %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
fi
fi
%{_bindir}/dockerd
%{_bindir}/docker-proxy
%{_libexecdir}/docker/docker-init
%{_unitdir}/docker.service
%{_unitdir}/docker.socket
%{_mandir}/man*/*
%dir /etc/docker
%post
%systemd_post docker
%systemd_post docker.service
if ! getent group docker > /dev/null; then
groupadd --system docker
fi
%preun
%systemd_preun docker
%systemd_preun docker.service docker.socket
%postun
%systemd_postun_with_restart docker
%posttrans
if [ $1 -ge 0 ] ; then
# package upgrade scenario, after new files are installed
# check if docker was running before upgrade
if [ -f %{_localstatedir}/lib/rpm-state/docker-is-active ]; then
systemctl start docker > /dev/null 2>&1 || :
rm -f %{_localstatedir}/lib/rpm-state/docker-is-active > /dev/null 2>&1 || :
fi
fi
%systemd_postun_with_restart docker.service
%changelog

View File

@ -0,0 +1,57 @@
%global debug_package %{nil}
Name: docker-compose-plugin
Version: %{_compose_rpm_version}
Release: %{_release}%{?dist}
Epoch: 0
Source0: compose.tgz
Summary: Docker Compose (V2) plugin for the Docker CLI
Group: Tools/Docker
License: Apache-2.0
URL: https://github.com/docker/compose/
Vendor: Docker
Packager: Docker <support@docker.com>
Enhances: docker-ce-cli
Recommends: docker-buildx-plugin
BuildRequires: bash
%description
Docker Compose (V2) plugin for the Docker CLI.
This plugin provides the 'docker compose' subcommand.
The binary can also be run standalone as a direct replacement for
Docker Compose V1 ('docker-compose').
%prep
%setup -q -c -n src -a 0
%build
make -C ${RPM_BUILD_DIR}/src/compose VERSION=%{_compose_version} DESTDIR=./bin build
%check
ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-compose docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \
test "$ver" = "%{_compose_version}" && echo "PASS: docker-compose version OK" || (echo "FAIL: docker-compose version ($ver) did not match" && exit 1)
%install
install -D -p -m 0755 ${RPM_BUILD_DIR}/src/compose/bin/docker-compose ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-compose
for f in LICENSE MAINTAINERS NOTICE README.md; do
install -D -p -m 0644 "${RPM_BUILD_DIR}/src/compose/$f" "docker-compose-plugin-docs/$f"
done
%files
%doc docker-compose-plugin-docs/*
%license docker-compose-plugin-docs/LICENSE
%license docker-compose-plugin-docs/NOTICE
%{_libexecdir}/docker/cli-plugins/docker-compose
%post
%preun
%postun
%changelog

View File

@ -0,0 +1,52 @@
%global debug_package %{nil}
Name: docker-model-plugin
Version: %{_model_rpm_version}
Release: %{_release}%{?dist}
Epoch: 0
Source0: model.tgz
Summary: Docker Model Runner plugin for the Docker CLI
Group: Tools/Docker
License: Apache-2.0
URL: https://docs.docker.com/model-runner/
Vendor: Docker
Packager: Docker <support@docker.com>
Enhances: docker-ce-cli
BuildRequires: bash
%description
Docker Model Runner plugin for the Docker CLI.
This plugin provides the 'docker model' subcommand.
%prep
%setup -q -c -n src -a 0
%build
GO111MODULE=on make -C ${RPM_BUILD_DIR}/src/model VERSION=%{_model_version} ce-release
%check
ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-model docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \
test "$ver" = "%{_model_version}" && echo "PASS: docker-model version OK" || (echo "FAIL: docker-model version ($ver) did not match" && exit 1)
%install
install -D -p -m 0755 ${RPM_BUILD_DIR}/src/model/dist/docker-model ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-model
for f in LICENSE; do
install -D -p -m 0644 "${RPM_BUILD_DIR}/src/model/$f" "docker-model-plugin-docs/$f"
done
%files
%doc docker-model-plugin-docs/*
%license docker-model-plugin-docs/LICENSE
%{_libexecdir}/docker/cli-plugins/docker-model
%post
%preun
%postun
%changelog

35
rpm/centos-10/Dockerfile Normal file
View File

@ -0,0 +1,35 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=centos
ARG SUITE=10
ARG BUILD_IMAGE=quay.io/centos/${DISTRO}:stream${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
# RHEL8 / CentOS 8 changed behavior and no longer "rpm --import" or
# "rpmkeys --import"as part of rpm package's %post scriplet. See
# https://forums.centos.org/viewtopic.php?f=54&t=72574, and
# https://access.redhat.com/solutions/3720351
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial-SHA256
RUN dnf install -y rpm-build dnf-plugins-core
RUN dnf config-manager --set-enabled crb
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

View File

@ -1,20 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=centos:7
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
ENV DISTRO centos
ENV SUITE 7
ENV GOPATH=/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
RUN yum install -y rpm-build rpmlint
COPY SPECS /root/rpmbuild/SPECS
# Overwrite repo that was failing on aarch64
RUN sed -i 's/altarch/centos/g' /etc/yum.repos.d/CentOS-Sources.repo
RUN yum-builddep -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

35
rpm/centos-9/Dockerfile Normal file
View File

@ -0,0 +1,35 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=centos
ARG SUITE=9
ARG BUILD_IMAGE=quay.io/centos/${DISTRO}:stream${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
# RHEL8 / CentOS 8 changed behavior and no longer "rpm --import" or
# "rpmkeys --import"as part of rpm package's %post scriplet. See
# https://forums.centos.org/viewtopic.php?f=54&t=72574, and
# https://access.redhat.com/solutions/3720351
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
RUN dnf install -y rpm-build dnf-plugins-core
RUN dnf config-manager --set-enabled crb
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

View File

@ -1,18 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=fedora:28
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
ENV DISTRO fedora
ENV SUITE 28
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
RUN dnf install -y rpm-build rpmlint dnf-plugins-core
COPY SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

View File

@ -1,18 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=fedora:29
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
ENV DISTRO fedora
ENV SUITE 29
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
RUN dnf install -y rpm-build rpmlint dnf-plugins-core
COPY SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

View File

@ -1,18 +0,0 @@
ARG GO_IMAGE
ARG BUILD_IMAGE=fedora:30
FROM ${GO_IMAGE} as golang
FROM ${BUILD_IMAGE}
ENV DISTRO fedora
ENV SUITE 30
ENV GOPATH /go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH 1
ENV DOCKER_BUILDTAGS seccomp selinux
ENV RUNC_BUILDTAGS seccomp selinux
RUN dnf install -y rpm-build rpmlint dnf-plugins-core
COPY SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

50
rpm/fedora-41/Dockerfile Normal file
View File

@ -0,0 +1,50 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=fedora
ARG SUITE=41
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
RUN dnf install -y rpm-build dnf-plugins-core
# FIXME(thaJeztah): workaround for building on Fedora 41 on arm64
#
# This is the equivalent of https://github.com/docker/containerd-packaging/pull/390
# for containerd packages, but unlike for containerd packages, we currently do
# not run into this issue when building docker-ce packages. We're installing
# this as a precaution, but perhaps it's not needed.
#
# go1.21 and up have a patch that enforces the use of ld.gold to work around
# a bug in GNU binutils. See;
# - https://github.com/golang/go/issues/22040.
# - https://github.com/golang/go/commit/cd77738198ffe0c4a1db58352c89f9b2d2a4e85e
#
# Fedora 41 and up has a fixed version of binutils, and no longer requires that
# patch, but may fail without ld.gold installed;
#
# /usr/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-1738353519/go.o /tmp/go-link-1738353519/000000.o /tmp/go-link-1738353519/000001.o /tmp/go-link-1738353519/000002.o /tmp/go-link-1738353519/000003.o /tmp/go-link-1738353519/000004.o /tmp/go-link-1738353519/000005.o /tmp/go-link-1738353519/000006.o /tmp/go-link-1738353519/000007.o /tmp/go-link-1738353519/000008.o /tmp/go-link-1738353519/000009.o /tmp/go-link-1738353519/000010.o /tmp/go-link-1738353519/000011.o /tmp/go-link-1738353519/000012.o /tmp/go-link-1738353519/000013.o /tmp/go-link-1738353519/000014.o /tmp/go-link-1738353519/000015.o /tmp/go-link-1738353519/000016.o /tmp/go-link-1738353519/000017.o /tmp/go-link-1738353519/000018.o /tmp/go-link-1738353519/000019.o /tmp/go-link-1738353519/000020.o /tmp/go-link-1738353519/000021.o /tmp/go-link-1738353519/000022.o /tmp/go-link-1738353519/000023.o /tmp/go-link-1738353519/000024.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g
# collect2: fatal error: cannot find 'ld'
#
# Fedora's build of Go carries a patch for that, but it's not (yet) in upstream;
# - https://src.fedoraproject.org/rpms/golang/blob/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77/f/0006-Default-to-ld.bfd-on-ARM64.patch
# - https://src.fedoraproject.org/rpms/golang/c/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77?branch=rawhide
#
# As a workaround; install binutils-gold
RUN if [ "$(arch)" = 'aarch64' ]; then dnf -y install binutils-gold; fi
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

51
rpm/fedora-42/Dockerfile Normal file
View File

@ -0,0 +1,51 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=fedora
ARG SUITE=42
ARG BUILD_IMAGE=${DISTRO}:${SUITE}
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE}
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
RUN dnf install -y rpm-build dnf-plugins-core
# FIXME(thaJeztah): workaround for building on Fedora 41 and up on arm64
#
# This is the equivalent of https://github.com/docker/containerd-packaging/pull/390
# for containerd packages, but unlike for containerd packages, we currently do
# not run into this issue when building docker-ce packages. We're installing
# this as a precaution, but perhaps it's not needed.
#
# go1.21 and up have a patch that enforces the use of ld.gold to work around
# a bug in GNU binutils. See;
# - https://github.com/golang/go/issues/22040.
# - https://github.com/golang/go/commit/cd77738198ffe0c4a1db58352c89f9b2d2a4e85e
#
# Fedora 41 and up has a fixed version of binutils, and no longer requires that
# patch, but may fail without ld.gold installed;
#
# /usr/bin/gcc -Wl,-z,now -Wl,-z,nocopyreloc -fuse-ld=gold -o $WORK/b001/exe/a.out -rdynamic /tmp/go-link-1738353519/go.o /tmp/go-link-1738353519/000000.o /tmp/go-link-1738353519/000001.o /tmp/go-link-1738353519/000002.o /tmp/go-link-1738353519/000003.o /tmp/go-link-1738353519/000004.o /tmp/go-link-1738353519/000005.o /tmp/go-link-1738353519/000006.o /tmp/go-link-1738353519/000007.o /tmp/go-link-1738353519/000008.o /tmp/go-link-1738353519/000009.o /tmp/go-link-1738353519/000010.o /tmp/go-link-1738353519/000011.o /tmp/go-link-1738353519/000012.o /tmp/go-link-1738353519/000013.o /tmp/go-link-1738353519/000014.o /tmp/go-link-1738353519/000015.o /tmp/go-link-1738353519/000016.o /tmp/go-link-1738353519/000017.o /tmp/go-link-1738353519/000018.o /tmp/go-link-1738353519/000019.o /tmp/go-link-1738353519/000020.o /tmp/go-link-1738353519/000021.o /tmp/go-link-1738353519/000022.o /tmp/go-link-1738353519/000023.o /tmp/go-link-1738353519/000024.o -O2 -g -lresolv -O2 -g -lpthread -O2 -g -ldl -O2 -g
# collect2: fatal error: cannot find 'ld'
#
# Fedora's build of Go carries a patch for that, but it's not (yet) in upstream;
# - https://src.fedoraproject.org/rpms/golang/blob/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77/f/0006-Default-to-ld.bfd-on-ARM64.patch
# - https://src.fedoraproject.org/rpms/golang/c/a867bd88a656c1d6e91e7b18bab696dc3fcf1e77?branch=rawhide
#
# As a workaround; install binutils-gold
RUN if [ "$(rpm --query --queryformat='%{ARCH}' rpm)" = 'aarch64' ] && ! command -v ld.gold; then dnf -y install binutils-gold; fi
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

View File

@ -1,68 +1,115 @@
#!/usr/bin/env bash
ENGINE_DIR=$1
VERSION=$2
REPO_DIR="$1"
VERSION="$2"
[[ $# < 2 ]] && echo 'not enough args' && exit 1
DATE_COMMAND="date"
if [[ $(uname) -eq "Darwin" ]]; then
DATE_COMMAND="docker run --rm alpine date"
if [ -z "$REPO_DIR" ] || [ -z "$VERSION" ]; then
# shellcheck disable=SC2016
echo 'usage: ./gen-rpm-ver ${REPO_DIR} ${VERSION}'
exit 1
fi
GIT_COMMAND="git -C $ENGINE_DIR"
GIT_COMMAND="git -C $REPO_DIR"
origVersion="$VERSION"
rpmVersion="$VERSION"
rpmRelease=3
rpmVersion="${VERSION#v}"
# rpmRelease versioning is as follows
# Docker 18.01.0-ce: version=18.01.0.ce, release=3
# Docker 18.01.0-ce-tp1: version=18.01.0.ce, release=0.1.tp1
# Docker 18.01.0-ce-beta1: version=18.01.0.ce, release=1.1.beta1
# Docker 18.01.0-ce-rc1: version=18.01.0.ce, release=2.1.rc1
# Docker 18.01.0-ce-cs1: version=18.01.0.ce.cs1, release=1
# Docker 18.01.0-ce-cs1-rc1: version=18.01.0.ce.cs1, release=0.1.rc1
# Docker 18.01.0-ce-dev nightly: version=18.01.0.ce, release=0.0.YYYYMMDD.HHMMSS.gitHASH
# rpm "Release:" field ($rpmRelease) is used to set the "_release" macro, which
# is an incremental number for builds of the same release (Version: / #rpmVersion).
#
# This field can be:
#
# - Version: 0 : Package was built, but no matching upstream release (e.g., can be used for "nightly" builds)
# - Version: 1 : Package was built for an upstream (pre)release version
# - Version: > 1 : Only to be used for packaging-only changes (new package built for a version for which a package was already built/released)
#
# For details, see the Fedora packaging guide:
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_complex_versioning_with_a_reasonable_upstream
#
# Note that older versions of the rpm spec allowed more traditional information
# in this field, which is still allowed, but considered deprecated; see
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_complex_versioning_with_a_reasonable_upstream
#
# In our case, this means that all releases, except for "nightly" builds should
# use "Version: 1". Only in an exceptional case, where we need to publish a new
# package (build) for an existing release, "Version: 2" should be used; this script
# does not currently account for that situation.
#
# Assuming all tagged version of rpmRelease correspond with an upstream release,
# this means that versioning is as follows:
#
# Docker 23.0.0: version=23.0.0, release=1
# Docker 23.0.0-alpha.1: version=23.0.0, release=1
# Docker 23.0.0-beta.1: version=23.0.0, release=1
# Docker 23.0.0-rc.1: version=23.0.0, release=1
# Docker 23.0.0-dev: version=0.0.0~YYYYMMDDHHMMSS.gitHASH, release=0
rpmRelease=1
if [[ "$rpmVersion" =~ .*-tp[0-9]+$ ]]; then
tpVersion=${rpmVersion#*-tp}
rpmVersion=${rpmVersion%-tp*}
rpmRelease="0.${tpVersion}.tp${tpVersion}"
elif [[ "$rpmVersion" =~ .*-beta[0-9]+$ ]]; then
betaVersion=${rpmVersion#*-beta}
rpmVersion=${rpmVersion%-beta*}
rpmRelease="1.${betaVersion}.beta${betaVersion}"
elif [[ "$rpmVersion" =~ .*-rc[0-9]+$ ]]; then
rcVersion=${rpmVersion#*-rc}
rpmVersion=${rpmVersion%-rc*}
rpmRelease="2.${rcVersion}.rc${rcVersion}"
fi
# rpm packages require a tilde (~) instead of a hyphen (-) as separator between
# the version # and pre-release suffixes, otherwise pre-releases are sorted AFTER
# non-pre-release versions, which would prevent users from updating from a pre-
# release version to the "ga" version.
#
# For details, see the Fedora packaging guide:
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_handling_non_sorting_versions_with_tilde_dot_and_caret
#
# > The tilde symbol (~) is used before a version component which must sort
# > earlier than any non-tilde component. It is used for any pre-release versions
# > which wouldnt otherwise sort appropriately.
# >
# > For example, with upstream releases 0.4.0, 0.4.1, 0.5.0-rc1, 0.5.0-rc2, 0.5.0,
# > the two "release candidates" should use 0.5.0~rc1 and 0.5.0~rc2 in the Version:
# > field. Bugfix or "patchlevel" releases that some upstream make should be handled
# > using simple versioning. The separator used by upstream may need to be replaced
# > by a dot or dropped.
# >
# > For example, if the same upstream released 0.5.0-post1 as a bugfix version,
# > this "post-release" should use 0.5.0.post1 in the Version: field. Note that
# > 0.5.0.post1 sorts lower than both 0.5.1 and 0.5.0.1.
#
# The code below replaces hyphens with tildes. Note that an intermediate $tilde
# variable is needed to make this work on all versions of Bash. In some versions
# of Bash, the tilde would be substituted with $HOME (even when escaped (\~) or
# quoted ('~').
tilde='~'
rpmVersion="${rpmVersion//-/$tilde}"
DOCKER_GITCOMMIT=$($GIT_COMMAND rev-parse --short HEAD)
if [ -n "$($GIT_COMMAND status --porcelain --untracked-files=no)" ]; then
DOCKER_GITCOMMIT="$DOCKER_GITCOMMIT-unsupported"
DOCKER_GITCOMMIT="$DOCKER_GITCOMMIT-unsupported"
fi
# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
if [[ "$rpmVersion" == *-dev ]] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
gitDate="$($DATE_COMMAND --utc --date "@$gitUnix" +'%Y%m%d%H%M%S')"
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
# rpmVersion is now something like '0.0.0-20180719213702-cd5e2db'
rpmVersion="0.0.0-${gitDate}-${gitCommit}"
rpmRelease="0"
origVersion=$rpmVersion
# if we have a "-dev" suffix or have change in Git, this is a nightly build, and
# we'll create a pseudo version based on commit-date and -sha.
if [[ "$VERSION" == *-dev ]] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then
export TZ=UTC
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
if [ "$(uname)" = "Darwin" ]; then
# Using BSD date (macOS), which doesn't support the --date option
# date -jf "<input format>" "<input value>" +"<output format>" (https://unix.stackexchange.com/a/86510)
gitDate="$(TZ=UTC date -u -jf "%s" "$gitUnix" +'%Y%m%d%H%M%S')"
else
# Using GNU date (Linux)
gitDate="$(TZ=UTC date -u --date "@$gitUnix" +'%Y%m%d%H%M%S')"
fi
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
# generated version is now something like '0.0.0-20180719213702-cd5e2db'
origVersion="0.0.0-${gitDate}-${gitCommit}" # (using hyphens)
rpmVersion="0.0.0~${gitDate}.${gitCommit}" # (using tilde and periods)
rpmRelease=0
fi
# Replace any other dashes with periods
# Replace any remaining dashes with periods
rpmVersion="${rpmVersion//-/.}"
echo $rpmVersion $rpmRelease $DOCKER_GITCOMMIT $origVersion
echo "$rpmVersion $rpmRelease $DOCKER_GITCOMMIT $origVersion"

45
rpm/rhel-8/Dockerfile Normal file
View File

@ -0,0 +1,45 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=rhel
ARG SUITE=8
ARG BUILD_IMAGE=registry.access.redhat.com/ubi8/ubi
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE} AS subscribed-image
RUN --mount=type=secret,id=rh-user --mount=type=secret,id=rh-pass <<-EOT
rm -f /etc/rhsm-host
if [ ! -f /run/secrets/rh-user ] || [ ! -f /run/secrets/rh-pass ]; then
echo "Either RH_USER or RH_PASS is not set. Running build without subscription."
else
subscription-manager register \
--username="$(cat /run/secrets/rh-user)" \
--password="$(cat /run/secrets/rh-pass)"
subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
# dnf config-manager --set-enabled codeready-builder-for-rhel-8-$(arch)-rpms
fi
EOT
FROM subscribed-image
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
RUN dnf install -y rpm-build
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

45
rpm/rhel-9/Dockerfile Normal file
View File

@ -0,0 +1,45 @@
# syntax=docker/dockerfile:1
ARG GO_IMAGE=golang:latest
ARG DISTRO=rhel
ARG SUITE=9
ARG BUILD_IMAGE=registry.access.redhat.com/ubi9/ubi
FROM ${GO_IMAGE} AS golang
FROM ${BUILD_IMAGE} AS subscribed-image
RUN --mount=type=secret,id=rh-user --mount=type=secret,id=rh-pass <<-EOT
rm -f /etc/rhsm-host
if [ ! -f /run/secrets/rh-user ] || [ ! -f /run/secrets/rh-pass ]; then
echo "Either RH_USER or RH_PASS is not set. Running build without subscription."
else
subscription-manager register \
--username="$(cat /run/secrets/rh-user)" \
--password="$(cat /run/secrets/rh-pass)"
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
# dnf config-manager --set-enabled codeready-builder-for-rhel-9-$(arch)-rpms
fi
EOT
FROM subscribed-image
ENV GOPROXY=https://proxy.golang.org|direct
ENV GO111MODULE=on
ENV GOPATH=/go
ENV GOTOOLCHAIN=local
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
ENV AUTO_GOPATH=1
ENV DOCKER_BUILDTAGS=exclude_graphdriver_btrfs
ARG DISTRO
ARG SUITE
ENV DISTRO=${DISTRO}
ENV SUITE=${SUITE}
RUN dnf install -y rpm-build
COPY --link SPECS /root/rpmbuild/SPECS
RUN dnf builddep -y /root/rpmbuild/SPECS/*.spec
COPY --link --from=golang /usr/local/go /usr/local/go
WORKDIR /root/rpmbuild
ENTRYPOINT ["/bin/rpmbuild"]

39
scripts/checkout.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env sh
# Copyright 2018-2020 Docker Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
checkout() (
set -ex
SRC="$1"
REF="$2"
REF_FETCH="$REF"
# if ref is branch or tag, retrieve its canonical form
REF=$(git -C "$SRC" ls-remote --refs --heads --tags origin "$REF" | awk '{print $2}')
if [ -n "$REF" ]; then
# if branch or tag then create it locally too
REF_FETCH="$REF:$REF"
else
REF="FETCH_HEAD"
fi
git -C "$SRC" fetch --update-head-ok --depth 1 origin "$REF_FETCH"
git -C "$SRC" checkout -q "$REF"
)
# Only execute checkout function above if this file is executed, not sourced from another script
prog=checkout.sh # needs to be in sync with this file's name
if [ "$(basename -- $0)" = "$prog" ]; then
checkout $*
fi

View File

@ -1,14 +1,30 @@
SHELL:=/bin/bash
ENGINE_DIR:=$(CURDIR)/../../engine
CLI_DIR:=$(CURDIR)/../../cli
VERSION?=0.0.0-dev
STATIC_VERSION=$(shell ./gen-static-ver $(ENGINE_DIR) $(VERSION))
CHOWN=docker run --rm -v $(CURDIR):/v -w /v alpine chown
include ../common.mk
CLI_DIR=$(realpath $(CURDIR)/../src/github.com/docker/cli)
ENGINE_DIR=$(realpath $(CURDIR)/../src/github.com/docker/docker)
BUILDX_DIR=$(realpath $(CURDIR)/../src/github.com/docker/buildx)
ENGINE_GITCOMMIT?=$(shell cd $(realpath $(CURDIR)/../src/github.com/docker/docker) && git rev-parse --short HEAD)
GEN_STATIC_VER=$(shell ./gen-static-ver $(CLI_DIR) $(VERSION))
HASH_CMD=docker run -v $(CURDIR):/sum -w /sum debian:jessie bash hash_files
DIR_TO_HASH:=build/linux
DEFAULT_PRODUCT_LICENSE?=Community Engine
DOCKER_CLI_GOLANG_IMG=golang:$(GO_VERSION)
DOCKER_CLI_GOLANG_IMG=$(shell awk '$$1=="FROM"{split($$2,a,"-");print a[1];exit}' $(CLI_DIR)/dockerfiles/Dockerfile.dev)
DOCKER_BUILD_OPTS=
ifneq ($(strip $(CONTAINERD_VERSION)),)
# Set custom build-args to override the containerd version to build for static
# packages.
DOCKER_BUILD_OPTS +=--build-arg=CONTAINERD_VERSION=$(CONTAINERD_VERSION)
endif
ifneq ($(strip $(RUNC_VERSION)),)
# Set custom build-args to override the runc version to build for static packages.
DOCKER_BUILD_OPTS +=--build-arg=RUNC_VERSION=$(RUNC_VERSION)
endif
ENGINE_BUILD_OPTS=--build-arg VERSION=$(GEN_STATIC_VER) --build-arg DOCKER_GITCOMMIT=$(ENGINE_GITCOMMIT) --build-arg DEFAULT_PRODUCT_LICENSE --build-arg PACKAGER_NAME --build-arg PLATFORM $(DOCKER_BUILD_OPTS)
.PHONY: help
help: ## show make targets
@ -18,88 +34,82 @@ help: ## show make targets
clean: ## remove build artifacts
[ ! -d build ] || $(CHOWN) -R $(shell id -u):$(shell id -g) build
$(RM) -r build
-docker builder prune -f --filter until=24h
.PHONY: static
static: static-linux cross-mac cross-win cross-arm ## create all static packages
.PHONY: static-linux
static-linux: static-cli static-engine ## create tgz with linux x86_64 client and server
static-linux: static-cli static-engine static-buildx-plugin ## create tgz
mkdir -p build/linux/docker
cp $(CLI_DIR)/build/docker build/linux/docker/
for f in dockerd containerd ctr containerd-shim docker-init docker-proxy runc; do \
cp -L $(ENGINE_DIR)/bundles/binary-daemon/$$f build/linux/docker/$$f; \
for f in dockerd containerd ctr containerd-shim containerd-shim-runc-v2 docker-init docker-proxy runc; do \
cp -L $(ENGINE_DIR)/bundles/binary/$$f build/linux/docker/$$f; \
done
tar -C build/linux -c -z -f build/linux/docker-$(STATIC_VERSION).tgz docker
tar -C build/linux -c -z -f build/linux/docker-$(GEN_STATIC_VER).tgz docker
# extra binaries for running rootless
mkdir -p build/linux/docker-rootless-extras
for f in rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh vpnkit; do \
if [ -f $(ENGINE_DIR)/bundles/binary-daemon/$$f ]; then \
cp -L $(ENGINE_DIR)/bundles/binary-daemon/$$f build/linux/docker-rootless-extras/$$f; \
for f in rootlesskit dockerd-rootless.sh dockerd-rootless-setuptool.sh vpnkit; do \
if [ -f $(ENGINE_DIR)/bundles/binary/$$f ]; then \
cp -L $(ENGINE_DIR)/bundles/binary/$$f build/linux/docker-rootless-extras/$$f; \
fi \
done
tar -C build/linux -c -z -f build/linux/docker-rootless-extras-$(STATIC_VERSION).tgz docker-rootless-extras
tar -C build/linux -c -z -f build/linux/docker-rootless-extras-$(GEN_STATIC_VER).tgz docker-rootless-extras
# buildx
tar -C $(BUILDX_DIR)/bin -c -z -f build/linux/docker-buildx-plugin-$(DOCKER_BUILDX_REF:v%=%).tgz docker-buildx
.PHONY: hash_files
hash_files:
@echo "Hashing directory $(DIR_TO_HASH)"
$(HASH_CMD) "$(DIR_TO_HASH)"
.PHONY: buildx
buildx:
docker buildx inspect | grep -q 'Driver: docker-container' || docker buildx create --use
.PHONY: cross-mac
cross-mac: cross-all-cli cross-mac-plugins ## create tgz with darwin x86_64 client only
mkdir -p build/mac/docker
cp $(CLI_DIR)/build/docker-darwin-amd64 build/mac/docker/docker
tar -C build/mac -c -z -f build/mac/docker-$(STATIC_VERSION).tgz docker
cross-mac: buildx
cd $(CLI_DIR) && VERSION=$(GEN_STATIC_VER) docker buildx bake --set binary.platform=darwin/amd64,darwin/arm64 binary
dest=$$PWD/build/mac; cd $(CLI_DIR)/build && for platform in *; do \
arch=$$(echo $$platform | cut -d_ -f2); \
mkdir -p $$dest/$$arch/docker; \
cp $$platform/docker-darwin-* $$dest/$$arch/docker/docker && \
tar -C $$dest/$$arch -c -z -f $$dest/$$arch/docker-$(GEN_STATIC_VER).tgz docker; \
done
.PHONY: cross-win
cross-win: cross-all-cli cross-win-engine cross-win-plugins ## create zip file with windows x86_64 client and server
mkdir -p build/win/docker
cp $(CLI_DIR)/build/docker-windows-amd64 build/win/docker/docker.exe
cp $(ENGINE_DIR)/bundles/cross/windows/amd64/dockerd-$(STATIC_VERSION).exe build/win/docker/dockerd.exe
docker run --rm -v $(CURDIR)/build/win:/v -w /v alpine sh -c 'apk update&&apk add zip&&zip -r docker-$(STATIC_VERSION).zip docker'
cross-win: cross-win-engine
cd $(CLI_DIR) && VERSION=$(GEN_STATIC_VER) docker buildx bake --set binary.platform=windows/amd64 binary
mkdir -p build/win/amd64/docker
cp $(CLI_DIR)/build/docker-windows-amd64.exe build/win/amd64/docker/docker.exe
cp $(ENGINE_DIR)/bundles/cross/win/dockerd.exe build/win/amd64/docker/dockerd.exe
docker run --rm -v $(CURDIR)/build/win/amd64:/v -w /v alpine sh -c 'apk update&&apk add zip&&zip -r docker-$(GEN_STATIC_VER).zip docker'
$(CHOWN) -R $(shell id -u):$(shell id -g) build
.PHONY: cross-arm
cross-arm: cross-all-cli ## create tgz with linux armhf client only
mkdir -p build/arm/docker
cp $(CLI_DIR)/build/docker-linux-arm build/arm/docker/docker
tar -C build/arm -c -z -f build/arm/docker-$(STATIC_VERSION).tgz docker
tar -C build/arm -c -z -f build/arm/docker-$(GEN_STATIC_VER).tgz docker
.PHONY: static-cli
static-cli:
$(MAKE) -C $(CLI_DIR) -f docker.Makefile VERSION=$(STATIC_VERSION) build
cd $(CLI_DIR) && VERSION=$(GEN_STATIC_VER) docker buildx bake --set binary.platform=$(TARGETPLATFORM) --set binary.args.CGO_ENABLED=$(CGO_ENABLED) binary
.PHONY: static-engine
static-engine:
$(MAKE) -C $(ENGINE_DIR) VERSION=$(STATIC_VERSION) binary
cd $(ENGINE_DIR) && docker buildx build --target all $(ENGINE_BUILD_OPTS) --output "./bundles/binary" .
.PHONY: static-buildx-plugin
static-buildx-plugin:
cd $(BUILDX_DIR) && docker buildx bake --set binaries.platform=$(TARGETPLATFORM) binaries && mv ./bin/build/buildx ./bin/docker-buildx
.PHONY: cross-all-cli
cross-all-cli:
$(MAKE) -C $(CLI_DIR) -f docker.Makefile VERSION=$(STATIC_VERSION) cross
$(MAKE) -C $(CLI_DIR) -f docker.Makefile VERSION=$(GEN_STATIC_VER) cross
.PHONY: cross-win-engine
cross-win-engine:
$(MAKE) -C $(ENGINE_DIR) VERSION=$(STATIC_VERSION) DOCKER_CROSSPLATFORMS=windows/amd64 cross
BUILD_PLUGIN_RUN_VARS = --rm -i \
-e GOOS=$(SPOOF_GOOS) \
-v "$(CURDIR)/build/$(CLI_BUILD_DIR)/docker/cli-plugins":/out \
-v "$(CURDIR)/../plugins":/plugins:ro \
-v "$(CURDIR)/scripts/build-cli-plugins":/build:ro
.PHONY: cross-mac-plugins
cross-mac-plugins: SPOOF_GOOS := darwin
cross-mac-plugins: CLI_BUILD_DIR := mac
cross-mac-plugins:
mkdir -p build/$(CLI_BUILD_DIR)/docker
docker run $(BUILD_PLUGIN_RUN_VARS) $(DOCKER_CLI_GOLANG_IMG) /build
$(CHOWN) -R $(shell id -u):$(shell id -g) build
.PHONY: cross-win-plugins
cross-win-plugins: SPOOF_GOOS := windows
cross-win-plugins: CLI_BUILD_DIR := win
cross-win-plugins:
mkdir -p build/$(CLI_BUILD_DIR)/docker/cli-plugins
docker run $(BUILD_PLUGIN_RUN_VARS) $(DOCKER_CLI_GOLANG_IMG) /build
$(CHOWN) -R $(shell id -u):$(shell id -g) build
find build/$(CLI_BUILD_DIR)/docker -type f -not -name "*.exe" -exec mv {} {}.exe \;
cd $(ENGINE_DIR) && docker buildx build --target binary $(ENGINE_BUILD_OPTS) --platform windows/amd64 --output "./bundles/cross/win" .

View File

@ -1,35 +1,46 @@
#!/usr/bin/env bash
ENGINE_DIR=$1
VERSION=$2
REPO_DIR="$1"
VERSION="$2"
if [ -z "$ENGINE_DIR" ] || [ -z "$VERSION" ]; then
echo 'usage: ./gen-static-ver ${ENGINE_DIR} ${VERSION}'
exit 1
if [ -z "$REPO_DIR" ] || [ -z "$VERSION" ]; then
# shellcheck disable=SC2016
echo 'usage: ./gen-static-ver ${REPO_DIR} ${VERSION}'
exit 1
fi
DATE_COMMAND="date"
if [[ $(uname) -eq "Darwin" ]]; then
DATE_COMMAND="docker run --rm alpine date"
fi
GIT_COMMAND="git -C $ENGINE_DIR"
GIT_COMMAND="git -C $REPO_DIR"
staticVersion="$VERSION"
if [[ "$VERSION" == *-dev ]]; then
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
gitDate="$($DATE_COMMAND --utc --date "@$gitUnix" +'%Y%m%d%H%M%S')"
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
# staticVersion is now something like '0.0.0-20180719213702-cd5e2db'
staticVersion="0.0.0-${gitDate}-${gitCommit}"
staticVersion="${VERSION#v}"
# if we have a "-dev" suffix or have change in Git, this is a nightly build, and
# we'll create a pseudo version based on commit-date and -sha.
if [[ "$VERSION" == *-dev ]] || [ -n "$($GIT_COMMAND status --porcelain)" ]; then
export TZ=UTC
# based on golang's pseudo-version: https://groups.google.com/forum/#!topic/golang-dev/a5PqQuBljF4
#
# using a "pseudo-version" of the form v0.0.0-yyyymmddhhmmss-abcdefabcdef,
# where the time is the commit time in UTC and the final suffix is the prefix
# of the commit hash. The time portion ensures that two pseudo-versions can
# be compared to determine which happened later, the commit hash identifes
# the underlying commit, and the v0.0.0- prefix identifies the pseudo-version
# as a pre-release before version v0.0.0, so that the go command prefers any
# tagged release over any pseudo-version.
gitUnix="$($GIT_COMMAND log -1 --pretty='%ct')"
if [ "$(uname)" = "Darwin" ]; then
# Using BSD date (macOS), which doesn't support the --date option
# date -jf "<input format>" "<input value>" +"<output format>" (https://unix.stackexchange.com/a/86510)
gitDate="$(TZ=UTC date -u -jf "%s" "$gitUnix" +'%Y%m%d%H%M%S')"
else
# Using GNU date (Linux)
gitDate="$(TZ=UTC date -u --date "@$gitUnix" +'%Y%m%d%H%M%S')"
fi
gitCommit="$($GIT_COMMAND log -1 --pretty='%h')"
# generated version is now something like '0.0.0-20180719213702-cd5e2db'
staticVersion="0.0.0-${gitDate}-${gitCommit}" # (using hyphens)
fi
echo "$staticVersion"

View File

@ -5,7 +5,7 @@
DIR_TO_LOOK_IN=${1:-build/linux}
for f in $(find "$DIR_TO_LOOK_IN" -type f); do
for hash_algo in md5 sha256; do
"${hash_algo}sum" "$f" > "$f.$hash_algo"
done
for hash_algo in md5 sha256; do
"${hash_algo}sum" "$f" >"$f.$hash_algo"
done
done

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -e
shopt -s globstar
# /plugins should be volume mounted from root plugins dir
# /out should also be volume mounted from static/out/
for installer in /plugins/*.installer; do
bash "${installer}" build
DESTDIR='/out' PREFIX="/" bash "${installer}" install_plugin
done

View File

@ -1,47 +0,0 @@
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3
# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
TasksMax=infinity
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target

View File

@ -1,12 +0,0 @@
[Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target

149
verify Executable file
View File

@ -0,0 +1,149 @@
#!/usr/bin/env bash
###
# Script Name: verify
#
# Description: This runs a smoke test to verify that the packages can be installed corrected
###
# build/${DIST_ID}/${DIST_VERSION}/${ARCH} - location of all packages
# Manually Testing: docker run --rm -it -v $(pwd):/v -w /v "centos:7" ./verify
set -e
source install-containerd-helpers
function verify() {
if dpkg --version >/dev/null 2>/dev/null; then
verify_deb
elif rpm --version >/dev/null 2>/dev/null; then
verify_rpm
else
echo "[ERROR] Unable to determine base os:"
cat /etc/os-release
exit 1
fi
}
function verify_binaries() {
docker --version
docker buildx version
docker compose version
docker model version
dockerd --version
docker-proxy --version
containerd --version
ctr --version
containerd-shim -v
containerd-shim-runc-v1 -v
containerd-shim-runc-v2 -v
runc --version
}
function verify_deb() {
# First install prerequisites for our script and dpkg and apt to run correctly.
# This list SHOULD NOT include dependencies of docker itself, otherwise we would
# not be able to verify that our packages specify all the required dependencies.
apt-get update
apt-get -y install --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
lsb-release
DIST_ID=$(source /etc/os-release; echo "$ID")
DIST_VERSION=$(lsb_release -sc)
if [ "${DIST_VERSION}" = "sid" ]; then
echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename'
exit 1
fi
install_debian_containerd
packages=$(find "deb/debbuild/${DIST_ID}-${DIST_VERSION}/" -type f -name "*.deb")
# All local packages need to be prefixed with `./` or else apt-get doesn't understand where to pull from
packages=$(echo "${packages}" | awk '$0="./"$0' | xargs)
(
set -x
# Install the locally built packages using 'dpkg' because installing with
# 'apt-get' would attempt to install dependency packages (such as the CLI)
# from download.docker.com instead of the locally built CLI package. Given
# that 'dpkg -i' does not install any dependency (but will fail if depen-
# dencies are missing), we use the '--ignore-depends' option to ignore
# packages we know to be missing at this stage, and '--force-depends' to
# only warn about any other missing dependency.
#
# shellcheck disable=SC2086
dpkg \
--ignore-depends=containerd.io,iptables,libdevmapper,libdevmapper1.02.1 \
--force-depends \
-i ${packages}
# After installing the local packages, we run 'apt-get install' with the
# '--fix-broken' option to trigger installation of the dependencies, which
# should succeed successfully. This step is to verify that not only the
# packages can be installed, but also that all dependencies (including
# containerd.io) can be resolved correctly for the distro that we built for,
# before going through the whole pipeline and publishing the packages.
#
# The '--no-upgrade' option is set to prevent apt from attempting to install
# packages from download(-stage).docker.com that we already installed using
# the local packages above. Without this, installing (e.g.) ./docker-ce-cli
# would result in apt installing "docker-ce" from the package repository and
# produce a "the following packages will be DOWNGRADED" error.
#
# shellcheck disable=SC2086
apt-get -y install --no-install-recommends --no-upgrade --fix-broken ${packages}
)
verify_binaries
}
function verify_rpm() {
DIST_ID=$(. /etc/os-release; echo "${ID}")
DIST_VERSION=$(. /etc/os-release; echo "${VERSION_ID}" | cut -d'.' -f1)
pkg_manager="yum"
pkg_config_manager="yum-config-manager"
if dnf --version; then
pkg_manager="dnf"
pkg_config_manager="dnf config-manager"
dnf clean all
${pkg_manager} install -y 'dnf-command(config-manager)'
fi
case ${DIST_ID}:${DIST_VERSION} in
ol:7*)
# Needed for container-selinux
${pkg_config_manager} --enable ol7_addons
;;
fedora*)
dnf install -y findutils
;;
esac
install_rpm_containerd
# find all rpm packages, exclude src package
echo "[DEBUG] Installing engine rpms"
packages=$(find "rpm/rpmbuild/${DIST_ID}-${DIST_VERSION}/RPMS/" -type f -name "*.rpm" | sed '/src/d')
# install all non-source packages
(
set -x
product_version=$(source /etc/os-release; echo "${REDHAT_SUPPORT_PRODUCT_VERSION:-}")
if [ "$product_version" = 'rawhide' ]; then
# force $releasever to account for Fedora pre-release images, as they
# may still be using "rawhide", which is not present on our package
# repositories on download.docker.com.
export DNF_VAR_releasever="$DIST_VERSION"
fi
${pkg_manager} install -y ${packages}
)
verify_binaries
}
verify