aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorGrzegorz Alibożek <70749001+galibozek@users.noreply.github.com>2022-01-19 22:55:17 +0100
committerGitHub <noreply@github.com>2022-01-19 16:55:17 -0500
commit4563148a61ba892e8f2bb66342f00a950bcd5315 (patch)
tree57bc8ecf43e76fbe06e3e1e0f2546deef8492785 /docker
parentb7c64576484d2095e946d847dbd7a751695870f8 (diff)
downloadgitea-4563148a61ba892e8f2bb66342f00a950bcd5315.tar.gz
gitea-4563148a61ba892e8f2bb66342f00a950bcd5315.zip
Upgrade Alpine from 3.13 to 3.15 (#18050)v1.17.0-dev
* Upgrade alpine to 3.15 * Add executability test to entrypoint for too old dockers Signed-off-by: Andrew Thornton <art27@cantab.net> * Update docker/rootless/usr/local/bin/docker-entrypoint.sh Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/root/usr/bin/entrypoint6
-rwxr-xr-xdocker/rootless/usr/local/bin/docker-entrypoint.sh6
2 files changed, 12 insertions, 0 deletions
diff --git a/docker/root/usr/bin/entrypoint b/docker/root/usr/bin/entrypoint
index a3c03ecff3..0acfec4dbe 100755
--- a/docker/root/usr/bin/entrypoint
+++ b/docker/root/usr/bin/entrypoint
@@ -1,5 +1,11 @@
#!/bin/sh
+# Protect against buggy runc in docker <20.10.6 causing problems in with Alpine >= 3.14
+if [ ! -x /bin/sh ]; then
+ echo "Executable test for /bin/sh failed. Your Docker version is too old to run Alpine 3.14+ and Gitea. You must upgrade Docker.";
+ exit 1;
+fi
+
if [ "${USER}" != "git" ]; then
# rename user
sed -i -e "s/^git\:/${USER}\:/g" /etc/passwd
diff --git a/docker/rootless/usr/local/bin/docker-entrypoint.sh b/docker/rootless/usr/local/bin/docker-entrypoint.sh
index d05777adc5..ca509214bf 100755
--- a/docker/rootless/usr/local/bin/docker-entrypoint.sh
+++ b/docker/rootless/usr/local/bin/docker-entrypoint.sh
@@ -1,5 +1,11 @@
#!/bin/sh
+# Protect against buggy runc in docker <20.10.6 causing problems in with Alpine >= 3.14
+if [ ! -x /bin/sh ]; then
+ echo "Executable test for /bin/sh failed. Your Docker version is too old to run Alpine 3.14+ and Gitea. You must upgrade Docker.";
+ exit 1;
+fi
+
if [ -x /usr/local/bin/docker-setup.sh ]; then
/usr/local/bin/docker-setup.sh || { echo 'docker setup failed' ; exit 1; }
fi