summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-02-07 13:56:36 +0100
committerPatrick Steinhardt <ps@pks.im>2020-02-07 13:56:36 +0100
commitfb03f02aa144f45bff89923238888809fae314dc (patch)
tree1e5be1cbd6d63a898688446e36e9ffbdffde4337
parent52cb4040f3b185746de3ed9fd1a5251239c5a9a9 (diff)
downloadlibgit2-fb03f02aa144f45bff89923238888809fae314dc.tar.gz
azure: docker: avoid re-creating libgit2 home directory
The Docker entrypoint currently creates the libgit2 user with "useradd --create-home". As we start the Docker container with two volumes pointing into "/home/libgit2/", the home directory will already exist. While useradd(1) copes with this just fine, it will print error messages to stderr which end up as failures in our Azure pipelines. Fix this by simply removing the "--create-home" parameter.
-rw-r--r--azure-pipelines/docker/entrypoint.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/azure-pipelines/docker/entrypoint.sh b/azure-pipelines/docker/entrypoint.sh
index 2118a2b5d..38eedf02b 100644
--- a/azure-pipelines/docker/entrypoint.sh
+++ b/azure-pipelines/docker/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
-useradd --shell /bin/bash --create-home libgit2
+#!/bin/bash -e
+useradd --shell /bin/bash libgit2
chown -R $(id -u libgit2) /home/libgit2
exec gosu libgit2 "$@"