Build Dockerimage fails
Summary
The build of the Dockerimage fails.
Steps to reproduce
git clone https://gitlab.com/gitlab-org/gitlab-runner
git checkout tags/v13.2.2
make deps
make runner-and-helper-bin-host
make package-deb-arch
make release_docker_images
Actual behavior
The build fails
Expected behavior
Build the image without an error
Relevant logs and/or screenshots
root@60b294056b13:/b# git clone https://gitlab.com/gitlab-org/gitlab-runner
Cloning into 'gitlab-runner'...
warning: redirecting to https://gitlab.com/gitlab-org/gitlab-runner.git/
remote: Enumerating objects: 10024, done.
remote: Counting objects: 100% (10024/10024), done.
remote: Compressing objects: 100% (2422/2422), done.
remote: Total 84727 (delta 8693), reused 7813 (delta 7583), pack-reused 74703
Receiving objects: 100% (84727/84727), 148.52 MiB | 10.49 MiB/s, done.
Resolving deltas: 100% (45687/45687), done.
root@60b294056b13:/b# cd gitlab-runner/
root@60b294056b13:/b/gitlab-runner# git checkout tags/v13.2.2
Note: switching to 'tags/v13.2.2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at a998cacdc Update CHANGELOG for v13.2.2
root@60b294056b13:/b/gitlab-runner# make deps
go get github.com/mitchellh/gox
# Installing "https://github.com/vektra/mockery/releases/download/v1.1.0/mockery_1.1.0_Linux_x86_64.tar.gz" as .tmp/mockery-1.1.0
root@60b294056b13:/b/gitlab-runner# make runner-and-helper-bin-host
# Building gitlab-runner in version 13.2.2 for host platform
make runner-bin BUILD_PLATFORMS="-osarch=linux/amd64"
make[1]: Entering directory '/b/gitlab-runner'
go get github.com/mitchellh/gox
# Building gitlab-runner in version 13.2.2 for -osarch=linux/amd64
gox -osarch=linux/amd64 \
-ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.2.2 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=a998cacd -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-08-14T12:40:05+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH= -s -w" \
-output="out/binaries/gitlab-runner-{{.OS}}-{{.Arch}}" \
gitlab.com/gitlab-org/gitlab-runner
Number of parallel builds: 6
--> linux/amd64: gitlab.com/gitlab-org/gitlab-runner
make[1]: Leaving directory '/b/gitlab-runner'
cp -f "out/binaries/gitlab-runner-linux-amd64" out/binaries/gitlab-runner
go get github.com/mitchellh/gox
gox -osarch=linux/amd64 -ldflags "-X gitlab.com/gitlab-org/gitlab-runner/common.NAME=gitlab-runner -X gitlab.com/gitlab-org/gitlab-runner/common.VERSION=13.2.2 -X gitlab.com/gitlab-org/gitlab-runner/common.REVISION=a998cacd -X gitlab.com/gitlab-org/gitlab-runner/common.BUILT=2020-08-14T12:40:05+0000 -X gitlab.com/gitlab-org/gitlab-runner/common.BRANCH= -s -w" -output=out/binaries/gitlab-runner-helper/gitlab-runner-helper.x86_64 gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Number of parallel builds: 6
--> linux/amd64: gitlab.com/gitlab-org/gitlab-runner/apps/gitlab-runner-helper
Building helper image for: linux/amd64
docker-buildx
Successfully created context "docker-buildx"
buildx-builder
[+] Building 12.1s (12/12) FINISHED
=> [internal] booting buildkit 2.3s
=> => pulling image moby/buildkit:buildx-stable-1 1.6s
=> => creating container buildx_buildkit_buildx-builder0 0.7s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 615B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3.12.0 3.3s
=> [1/6] FROM docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 2.9s
=> => resolve docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 0.0s
=> => sha256:df20fa9351a15782c64e6dddb2d4a6f50bf6d3688060a34c4014b0d9a752eb4c 2.80MB / 2.80MB 1.5s
=> => sha256:a24bb4013296f61e89ba57005a7b3e52274d8edd3ae2077d04395f806b63d83e 1.51kB / 1.51kB 0.0s
=> => sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 1.64kB / 1.64kB 0.0s
=> => sha256:a15790640a6690aa1730c38cf0a440e2aa44aaca9b0e8931a9f2b0d7cc90fd65 528B / 528B 0.0s
=> => unpacking docker.io/library/alpine:3.12.0@sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321 0.2s
=> [internal] load build context 0.3s
=> => transferring context: 17.46MB 0.2s
=> [2/6] RUN apk add --no-cache bash ca-certificates git git-lfs miniperl && ln -s miniperl /usr/bin/perl 2.5s
=> [3/6] RUN git lfs install --skip-repo 0.2s
=> [4/6] COPY ./scripts/ /usr/bin 0.1s
=> [5/6] COPY ./gitlab-runner-helper /usr/bin/ 0.1s
=> [6/6] RUN echo 'hosts: files dns' >> /etc/nsswitch.conf 0.1s
=> exporting to client 0.6s
=> => sending tarball 0.5s
xz -f -9 out/helper-images/prebuilt-x86_64.tar
root@60b294056b13:/b/gitlab-runner# make package-deb-arch
Doing `require 'backports'` is deprecated and will not load any backport in the next major release.
Require just the needed backports instead, or 'backports/latest'.
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
Created package {:path=>"out/deb/gitlab-runner_amd64.deb"}
root@60b294056b13:/b/gitlab-runner# make release_docker_images
# Releasing Docker images
amd64:
Building and loading image: dockerfiles/runner/ubuntu
docker-buildx
Successfully created context "docker-buildx"
buildx-builder
[+] Building 33.9s (9/11)
=> [internal] booting buildkit 2.4s
=> => pulling image moby/buildkit:buildx-stable-1 1.6s
=> => creating container buildx_buildkit_buildx-builder0 0.8s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 899B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.04 3.3s
=> [1/6] FROM docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 6.5s
=> => resolve docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 0.0s
=> => sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 1.42kB / 1.42kB 0.0s
=> => sha256:767eea1efb29ab7e215e1d97c8d758df5d587ca86e769a2dfb254c6b022895c3 1.15kB / 1.15kB 0.0s
=> => sha256:b6c12202c5ef07dc9eb8f9d9e71407064684ed70f8c4040b62679b7d30200840 161B / 161B 1.2s
=> => sha256:7595c8c21622ea8a8b9778972e26dbbe063f7a1c4b0a28a80a34ebb3d343b586 26.70MB / 26.70MB 3.7s
=> => sha256:2eb2d388e1a255c98029f40d6d7f8029fb13f1030abc8f11ccacbca686a8dc12 3.41kB / 3.41kB 0.0s
=> => sha256:d13af8ca898f36af68711cb67c345f65046a78ccd802453f4b129adf9205b1f8 35.36kB / 35.36kB 1.3s
=> => sha256:70799171ddba93a611490ba3557d782714b3f4da8963d49ac8726786ba8274a5 848B / 848B 1.2s
=> => unpacking docker.io/library/ubuntu:18.04@sha256:a61728f6128fb4a7a20efaa7597607ed6e69973ee9b9123e3b4fd28b7bba100b 1.6s
=> [internal] load build context 0.4s
=> => transferring context: 23.30MB 0.3s
=> [2/6] RUN apt-get update -y && apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl git wget tzdata openssh-client && rm -rf /va 21.1s
=> [3/6] COPY gitlab-runner_*.deb checksums-* install-deps install-gitlab-runner /tmp/ 0.3s
=> ERROR [4/6] RUN /tmp/install-deps "linux/amd64" "0.16.2" "1.2.2" "2.11.0" 0.2s
------
> [4/6] RUN /tmp/install-deps "linux/amd64" "0.16.2" "1.2.2" "2.11.0":
#8 0.115 tar: Archive is compressed. Use -j option
#8 0.115 tar: Error is not recoverable: exiting now
#8 0.115 dpkg-deb: error: tar subprocess returned error exit status 2
#8 0.116 dpkg: error processing archive /tmp/gitlab-runner_amd64.deb (--install):
#8 0.116 dpkg-deb --control subprocess returned error exit status 2
#8 0.124 Errors were encountered while processing:
#8 0.124 /tmp/gitlab-runner_amd64.deb
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c /tmp/install-deps "${TARGETPLATFORM}" "${DOCKER_MACHINE_VERSION}" "${DUMB_INIT_VERSION}" "${GIT_LFS_VERSION}"]: buildkit-runc did not terminate successfully
make: *** [Makefile:289: release_docker_images] Error 1
root@60b294056b13:/b/gitlab-runner#
Environment description
Ubuntu 20.04
Linux 60b294056b13 4.19.76-linuxkit #1 (closed) SMP Thu Oct 17 19:31:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linu
Used GitLab Runner version
v13.2.2