Skip to content

Commit 01a8340

Browse files
committed
azure: docker: fix ARM builds by replacing gosu(1)
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).
1 parent 76b49ca commit 01a8340

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

azure-pipelines/docker/bionic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ RUN apt-get update && \
77
curl \
88
gcc \
99
git \
10-
gosu \
1110
libcurl4-openssl-dev \
1211
libpcre3-dev \
1312
libssh2-1-dev \
@@ -19,6 +18,7 @@ RUN apt-get update && \
1918
openssl \
2019
pkgconf \
2120
python \
21+
sudo \
2222
valgrind \
2323
&& \
2424
rm -rf /var/lib/apt/lists/*
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash -e
22
useradd --shell /bin/bash libgit2
3-
chown -R $(id -u libgit2) /home/libgit2
4-
exec gosu libgit2 "$@"
3+
chown --recursive libgit2:libgit2 /home/libgit2
4+
exec sudo --preserve-env --user=libgit2 "$@"

azure-pipelines/docker/xenial

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ RUN apt-get update && \
88
curl \
99
gcc \
1010
git \
11-
gosu \
1211
krb5-user \
1312
libcurl4-gnutls-dev \
1413
libgcrypt20-dev \
@@ -23,6 +22,7 @@ RUN apt-get update && \
2322
openssl \
2423
pkgconf \
2524
python \
25+
sudo \
2626
valgrind \
2727
&& \
2828
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)