summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-02-18 15:20:43 +0100
committerPatrick Steinhardt <ps@pks.im>2020-02-18 16:43:52 +0100
commit01a8340662749943f3917505dc8ca65006495bec (patch)
tree83d9bef2675178eeb3aa61d17e5c8b0f7b0ec1de
parent76b49caf6a208e44d19c84caa6d42389f0de6194 (diff)
downloadlibgit2-pks/azure-fix-arm32.tar.gz
azure: docker: fix ARM builds by replacing gosu(1)pks/azure-fix-arm32
Our nightly builds are currently failing due to our ARM-based jobs. These jobs crash immediately when entering the Docker container with a exception thrown by Go's language runtime. As we're able to successfully builds the Docker images in previous steps, it's unlikely to be a bug in Docker itself. Instead, this exception is thrown by gosu(1), which is a Go-based utility to drop privileges and run by our entrypoint. Fix the issue by dropping gosu(1) in favor of sudo(1).
-rw-r--r--azure-pipelines/docker/bionic2
-rw-r--r--azure-pipelines/docker/entrypoint.sh4
-rw-r--r--azure-pipelines/docker/xenial2
3 files changed, 4 insertions, 4 deletions
diff --git a/azure-pipelines/docker/bionic b/azure-pipelines/docker/bionic
index 179134f25..ae9604de7 100644
--- a/azure-pipelines/docker/bionic
+++ b/azure-pipelines/docker/bionic
@@ -7,7 +7,6 @@ RUN apt-get update && \
curl \
gcc \
git \
- gosu \
libcurl4-openssl-dev \
libpcre3-dev \
libssh2-1-dev \
@@ -19,6 +18,7 @@ RUN apt-get update && \
openssl \
pkgconf \
python \
+ sudo \
valgrind \
&& \
rm -rf /var/lib/apt/lists/*
diff --git a/azure-pipelines/docker/entrypoint.sh b/azure-pipelines/docker/entrypoint.sh
index 38eedf02b..830df49e9 100644
--- a/azure-pipelines/docker/entrypoint.sh
+++ b/azure-pipelines/docker/entrypoint.sh
@@ -1,4 +1,4 @@
#!/bin/bash -e
useradd --shell /bin/bash libgit2
-chown -R $(id -u libgit2) /home/libgit2
-exec gosu libgit2 "$@"
+chown --recursive libgit2:libgit2 /home/libgit2
+exec sudo --preserve-env --user=libgit2 "$@"
diff --git a/azure-pipelines/docker/xenial b/azure-pipelines/docker/xenial
index bf68b5e69..8b2501de6 100644
--- a/azure-pipelines/docker/xenial
+++ b/azure-pipelines/docker/xenial
@@ -8,7 +8,6 @@ RUN apt-get update && \
curl \
gcc \
git \
- gosu \
krb5-user \
libcurl4-gnutls-dev \
libgcrypt20-dev \
@@ -23,6 +22,7 @@ RUN apt-get update && \
openssl \
pkgconf \
python \
+ sudo \
valgrind \
&& \
rm -rf /var/lib/apt/lists/*