summaryrefslogtreecommitdiff
path: root/hack/make
Commit message (Collapse)AuthorAgeFilesLines
* hack: enable Go modules when building dockerd and docker-proxyKevin Alvarez2023-04-251-1/+9
| | | | | | | | | This is a workaround to have buildinfo with deps embedded in the binary. We need to create a go.mod file before building with -modfile=vendor.mod, otherwise it fails with: "-modfile cannot be used to set the module root directory." Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* Merge pull request #44853 from crazy-max/rm-install-suffixSebastiaan van Stijn2023-01-204-18/+12
|\ | | | | hack: remove -installsuffix build flag
| * hack: display build cmd when DOCKER_DEBUG setCrazyMax2023-01-192-16/+10
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
| * hack: remove unnecessary vars in make.sh scriptCrazyMax2023-01-193-3/+3
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* | hack: check if cross-compiling before setting ARM target nameCrazyMax2023-01-201-16/+19
|/ | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* hack: name for target ARM architecture not specifiedKevin Alvarez2023-01-161-53/+16
| | | | | | | | | | | | | Build currently doesn't set the right name for target ARM architecture through switches in CGO_CFLAGS and CGO_CXXFLAGS when doing cross-compilation. This was previously fixed in https://github.com/moby/moby/pull/43474 Also removes the toolchain configuration. Following changes for cross-compilation in https://github.com/moby/moby/pull/44546, we forgot to remove the toolchain configuration that is not used anymore as xx already sets correct cc/cxx envs already. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* hack: typo in displayed platform nameCrazyMax2023-01-161-1/+1
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* Merge pull request #44748 from vvoland/buildflags-nopie-whenraceSebastiaan van Stijn2023-01-051-6/+9
|\ | | | | hack/make: Don't add -buildmode=pie with -race
| * hack/make: Don't add -buildmode=pie with -racePaweł Gronowski2023-01-051-6/+9
| | | | | | | | | | | | | | | | Make it possible to add `-race` to the BUILDFLAGS without making the build fail with error: "-buildmode=pie not supported when -race is enabled" Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
* | hack: restore copy_binaries funcCrazyMax2023-01-051-0/+24
|/ | | | | | This function is still useful for the dev environment. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* hack: update buildmode pie conditionCrazyMax2023-01-011-6/+3
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* hack: do not set buildmode pie for statically linked binaryCrazyMax2023-01-013-11/+14
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* IAmStatic not used anymoreCrazyMax2023-01-013-3/+0
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* hack: remove containerutility scriptCrazyMax2023-01-011-20/+0
| | | | | | | this script is not used anymore. containerutility is built in the Dockerfile. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* Dockerfile: use TARGETPLATFORM to build DockerCrazyMax2023-01-014-120/+65
| | | | | | | | | | | | | | | | Better support for cross compilation so we can fully rely on `--platform` flag of buildx for a seamless integration. This removes unnecessary extra cross logic in the Dockerfile, DOCKER_CROSSPLATFORMS and CROSS vars and some hack scripts as well. Non-sandboxed build invocation is still supported and dev stages in the Dockerfile have been updated accordingly. Bake definition and GitHub Actions workflows have been updated accordingly as well. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* Merge pull request #44494 from crazy-max/go-autogenSebastiaan van Stijn2022-11-231-4/+0
|\ | | | | hack: remove obsolete sources for go-autogen
| * hack: remove obsolete sources for go-autogenCrazyMax2022-11-181-4/+0
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* | Dockerfile: remove hardcoded platforms for vpnkit stageCrazyMax2022-11-222-5/+4
|/ | | | | | | | | | Current Dockerfile downloads vpnkit for both linux/amd64 and linux/arm64 platforms even if target platform does not match. This change will download vpnkit only if target platform matches, otherwise it will just use a dummy scratch stage. Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* daemon: add TEST_INTEGRATION_USE_SNAPSHOTTER for CISebastiaan van Stijn2022-10-171-0/+1
| | | | | | | | | | This allows us to run CI with the containerd snapshotter enabled, without patching the daemon.json, or changing how tests set up daemon flags. A warning log is added during startup, to inform if this variable is set, as it should only be used for our integration tests. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Volume prune: only prune anonymous volumes by defaultBrian Goff2022-10-041-1/+2
| | | | | | | | | | | | | | | This adds a new filter argument to the volume prune endpoint "all". When this is not set, or it is a false-y value, then only anonymous volumes are considered for pruning. When `all` is set to a truth-y value, you get the old behavior. This is an API change, but I think one that is what most people would want. Signed-off-by: Brian Goff <cpuguy83@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* ci(test): send coverage to codecovCrazyMax2022-09-081-3/+14
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* integration: TestNetworkLoopbackNat is broken on GitHub RunnerCrazyMax2022-09-071-0/+1
| | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* integration-cli: Correct emptyfs id under c8dPaweł Gronowski2022-08-161-0/+3
| | | | | | | The legacy v1 is not supported by the containerd import Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* hack: don't generate checksums for individual binariesSebastiaan van Stijn2022-07-042-30/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script to build (static)binaries also generated checksums for all binaries and scripts included. These checksums were not used, and not included when releasing packages (which are a `tar.gz` for which a separate checksum would be generated). Removing these checksums, as they're unused, and complicated using these artifacts for packagers (who would have to exclude them after building). Before this: ```bash rm -rf ./bundles docker buildx build --build-arg VERSION=22.06.0-beta.1 --output ./bundles --target binary . tree bundles bundles └── binary-daemon ├── containerd ├── containerd-shim-runc-v2 ├── containerd-shim-runc-v2.md5 ├── containerd-shim-runc-v2.sha256 ├── containerd.md5 ├── containerd.sha256 ├── ctr ├── ctr.md5 ├── ctr.sha256 ├── docker-init ├── docker-init.md5 ├── docker-init.sha256 ├── docker-proxy ├── docker-proxy.md5 ├── docker-proxy.sha256 ├── dockerd ├── dockerd-rootless-setuptool.sh ├── dockerd-rootless-setuptool.sh.md5 ├── dockerd-rootless-setuptool.sh.sha256 ├── dockerd-rootless.sh ├── dockerd-rootless.sh.md5 ├── dockerd-rootless.sh.sha256 ├── dockerd.md5 ├── dockerd.sha256 ├── rootlesskit ├── rootlesskit-docker-proxy ├── rootlesskit-docker-proxy.md5 ├── rootlesskit-docker-proxy.sha256 ├── rootlesskit.md5 ├── rootlesskit.sha256 ├── runc ├── runc.md5 ├── runc.sha256 ├── vpnkit ├── vpnkit.md5 └── vpnkit.sha256 1 directory, 36 files ``` After this: ```bash rm -rf ./bundles docker buildx build --build-arg VERSION=22.06.0-beta.1 --output ./bundles --target binary . tree bundles bundles └── binary-daemon ├── containerd ├── containerd-shim-runc-v2 ├── ctr ├── docker-init ├── docker-proxy ├── dockerd ├── dockerd-rootless-setuptool.sh ├── dockerd-rootless.sh ├── rootlesskit ├── rootlesskit-docker-proxy ├── runc └── vpnkit 1 directory, 12 files ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* hack: remove version from binaries, and remove symlinksSebastiaan van Stijn2022-07-027-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may have been some historic reason for doing this, but I couldn't find a practical use for building the (some) binaries with a version (default: "dev") included, only to use a symlink to refer to the actual binary. This patch removes the "${VERSION}" from the binary names in bundles, and removes the code that created symlinks for them. Before this patch: ```bash rm -rf ./bundles docker buildx build --build-arg VERSION=22.06.0-beta.1 --output ./bundles --target binary . tree bundles bundles └── binary-daemon ├── containerd ├── containerd-shim-runc-v2 ├── containerd-shim-runc-v2.md5 ├── containerd-shim-runc-v2.sha256 ├── containerd.md5 ├── containerd.sha256 ├── ctr ├── ctr.md5 ├── ctr.sha256 ├── docker-init ├── docker-init.md5 ├── docker-init.sha256 ├── docker-proxy -> docker-proxy-22.06.0-beta.1 ├── docker-proxy-22.06.0-beta.1 ├── docker-proxy-22.06.0-beta.1.md5 ├── docker-proxy-22.06.0-beta.1.sha256 ├── dockerd -> dockerd-22.06.0-beta.1 ├── dockerd-22.06.0-beta.1 ├── dockerd-22.06.0-beta.1.md5 ├── dockerd-22.06.0-beta.1.sha256 ├── dockerd-rootless-setuptool.sh ├── dockerd-rootless-setuptool.sh.md5 ├── dockerd-rootless-setuptool.sh.sha256 ├── dockerd-rootless.sh ├── dockerd-rootless.sh.md5 ├── dockerd-rootless.sh.sha256 ├── rootlesskit ├── rootlesskit-docker-proxy ├── rootlesskit-docker-proxy.md5 ├── rootlesskit-docker-proxy.sha256 ├── rootlesskit.md5 ├── rootlesskit.sha256 ├── runc ├── runc.md5 ├── runc.sha256 ├── vpnkit ├── vpnkit.md5 └── vpnkit.sha256 1 directory, 38 files ``` After this patch: ```bash rm -rf ./bundles docker buildx build --build-arg VERSION=22.06.0-beta.1 --output ./bundles --target binary . tree bundles bundles └── binary-daemon ├── containerd ├── containerd-shim-runc-v2 ├── containerd-shim-runc-v2.md5 ├── containerd-shim-runc-v2.sha256 ├── containerd.md5 ├── containerd.sha256 ├── ctr ├── ctr.md5 ├── ctr.sha256 ├── docker-init ├── docker-init.md5 ├── docker-init.sha256 ├── docker-proxy ├── docker-proxy.md5 ├── docker-proxy.sha256 ├── dockerd ├── dockerd-rootless-setuptool.sh ├── dockerd-rootless-setuptool.sh.md5 ├── dockerd-rootless-setuptool.sh.sha256 ├── dockerd-rootless.sh ├── dockerd-rootless.sh.md5 ├── dockerd-rootless.sh.sha256 ├── dockerd.md5 ├── dockerd.sha256 ├── rootlesskit ├── rootlesskit-docker-proxy ├── rootlesskit-docker-proxy.md5 ├── rootlesskit-docker-proxy.sha256 ├── rootlesskit.md5 ├── rootlesskit.sha256 ├── runc ├── runc.md5 ├── runc.sha256 ├── vpnkit ├── vpnkit.md5 └── vpnkit.sha256 1 directory, 36 files ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Merge pull request #43682 from crazy-max/split-test-suitesSebastiaan van Stijn2022-06-221-1/+1
|\ | | | | ci(integration-cli): split test suites in a matrix
| * ci(integration-cli): dynamically split tests in matrixCrazyMax2022-06-171-1/+1
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* | hack: remove error_on_leaked_containerd_shimsAkihiro Suda2022-06-052-17/+0
| | | | | | | | | | | | The function does not support containerd-shim-runc-v2 (io.containerd.runc.v2) Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
* | hack: stop installing containerd-shim (io.containerd.runtime.v1.linux)Akihiro Suda2022-06-052-2/+1
|/ | | | Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
* fix docker-proxy not statically linkedCrazyMax2022-05-201-0/+2
| | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Merge pull request #43275 from kponichtera/43274-delve-debuggerSebastiaan van Stijn2022-05-101-12/+47
|\ | | | | Added Delve debugger to the development container
| * Improved readability of the run hack scriptKonrad Ponichtera2022-05-101-32/+40
| | | | | | | | Signed-off-by: Konrad Ponichtera <konpon96@gmail.com>
| * Added Delve debugger to the development container (including instructions in ↵Konrad Ponichtera2022-04-261-4/+31
| | | | | | | | | | | | the contribution guide). Signed-off-by: Konrad Ponichtera <konpon96@gmail.com>
* | use go-winres for windows build and cleanup autogen and winresourcesCrazyMax2022-04-141-43/+106
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* | use go-winres for cross to create Windows resourcesCrazyMax2022-04-148-160/+93
| | | | | | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* | fix cross compilation for arm platformsCrazyMax2022-04-101-1/+15
|/ | | | Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
* docker-py: skip CreateContainerTest::test_create_with_device_cgroup_rulesSebastiaan van Stijn2022-01-201-2/+3
| | | | | | | | | | | | | | | | | | | | | This test is verifying that the container has the right options set (through `docker inspect`), but also checks if the cgroup-rules are set within the container by reading `/sys/fs/cgroup/devices/devices` Unlike cgroups v1, on cgroups v2, there is no file interface, and rules are handled through ebpf, which means that the test will fail because this file is not present. From the Linux documentation for cgroups v2: https://github.com/torvalds/linux/blob/v5.16/Documentation/admin-guide/cgroup-v2.rst#device-controller > (...) > Device controller manages access to device files. It includes both creation of > new device files (using mknod), and access to the existing device files. > > Cgroup v2 device controller has no interface files and is implemented on top of > cgroup BPF. To control access to device files, a user may create bpf programs > of type BPF_PROG_TYPE_CGROUP_DEVICE and att> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* CI: update docker-py to 5.0.3Sebastiaan van Stijn2021-10-201-1/+1
| | | | | | full diff: https://github.com/docker/docker-py/compare/5.0.0...5.0.3 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* info: remove "expected" check for tini versionSebastiaan van Stijn2021-08-231-1/+0
| | | | | | | | | These checks were added when we required a specific version of containerd and runc (different versions were known to be incompatible). I don't think we had a similar requirement for tini, so this check was redundant. Let's remove the check altogether. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Move proxy CLI to main cmd/Brian Goff2021-06-252-2/+2
| | | | | | | Since this command is part of the official distribution and even required for tests, let's move this up to the main cmd's. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Add s390x to cross platforms targetFrédéric Dalleau2021-06-242-2/+5
| | | | | Update build script and buid environment for supporting s390x Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
* Add ppc64le to cross platforms targetFrédéric Dalleau2021-06-242-1/+6
| | | | | | | debian uses ppc64el go uses ppc64le the cross compiler is powerpc64le Signed-off-by: Frédéric Dalleau <frederic.dalleau@docker.com>
* Adjust buildmode comment to link to commitTianon Gravi2021-06-111-1/+3
| | | | | | | | This should make sure the link is still meaningful if that file drastically changes (which should make it easier to trace where the interesting block of code moved to and how it changes over time). Also, add TODO items for Go 1.15+ and 1.16+ where we can "pie" more builds. Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
* don't use buildmode=pie on ppc64Georgy Yakovlev2021-06-101-2/+3
| | | | | | | | It's already omitted for ppc64 in hack/dockerfile/install/install.sh not using wildcard, because GOARCH=ppc64le supports pie Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
* Fixup libnetwork lint errorsBrian Goff2021-06-012-2/+2
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Fix issues running libnetwork tests.Brian Goff2021-06-011-1/+1
| | | | | | | | libnetwork does different stuff depending on if you are running the tests in a container or not... without telling it we are in a container a bunch of the tests actually fail. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Ensure docker-proxy is installed in unit-test ciBrian Goff2021-06-013-12/+26
| | | | | | | (some) libnetwork tests require docker-proxy so we need to install that in CI. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* Move proxy build into hack/makeBrian Goff2021-06-017-5/+42
| | | | Signed-off-by: Brian Goff <cpuguy83@gmail.com>
* testing: update docker-py 5.0.0Sebastiaan van Stijn2021-04-061-1/+1
| | | | | | | | drops support for python 2. full diff: https://github.com/docker/docker-py/compare/4.4.1...5.0.0 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Include VPNkit binary for arm64Akihiro Suda2021-02-251-1/+1
| | | | Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>