History

Upgrade Alpine from 3.13 to 3.15 (#18050)

* 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

Grzegorz Alibożek committed 4 years ago

Commit 45631481 parent b7c64574 files · +18 −10Browse files

Showing the changes to docker (2 of 4 files). Show all

Unified · Split

2 files
  1. docker/root/usr/bin/entrypoint +6 −0
  2. docker/rootless/usr/local/bin/docker-entrypoint.sh +6 −0
docker/root/usr/bin/entrypoint+6−0
@@ -1,5 +1,11 @@
1#!/bin/sh1#!/bin/sh
2 2
3# Protect against buggy runc in docker <20.10.6 causing problems in with Alpine >= 3.14
4if [ ! -x /bin/sh ]; then
5 echo "Executable test for /bin/sh failed. Your Docker version is too old to run Alpine 3.14+ and Gitea. You must upgrade Docker.";
6 exit 1;
7fi
8
3if [ "${USER}" != "git" ]; then9if [ "${USER}" != "git" ]; then
4 # rename user10 # rename user
5 sed -i -e "s/^git\:/${USER}\:/g" /etc/passwd11 sed -i -e "s/^git\:/${USER}\:/g" /etc/passwd
docker/rootless/usr/local/bin/docker-entrypoint.sh+6−0
@@ -1,5 +1,11 @@
1#!/bin/sh1#!/bin/sh
2 2
3# Protect against buggy runc in docker <20.10.6 causing problems in with Alpine >= 3.14
4if [ ! -x /bin/sh ]; then
5 echo "Executable test for /bin/sh failed. Your Docker version is too old to run Alpine 3.14+ and Gitea. You must upgrade Docker.";
6 exit 1;
7fi
8
3if [ -x /usr/local/bin/docker-setup.sh ]; then9if [ -x /usr/local/bin/docker-setup.sh ]; then
4 /usr/local/bin/docker-setup.sh || { echo 'docker setup failed' ; exit 1; }10 /usr/local/bin/docker-setup.sh || { echo 'docker setup failed' ; exit 1; }
5fi11fi