Skip to content

Commit 61057cc

Browse files
committed
Update to gosu 1.12
1 parent 813f36f commit 61057cc

File tree

7 files changed

+73
-109
lines changed

7 files changed

+73
-109
lines changed

10.1/Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

10.2/Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

10.3/Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

10.4/Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

10.5/Dockerfile

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

Dockerfile.template

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,27 @@ RUN set -ex; \
1818
rm -rf /var/lib/apt/lists/*
1919

2020
# add gosu for easy step-down from root
21-
ENV GOSU_VERSION 1.10
22-
RUN set -ex; \
23-
\
24-
fetchDeps=' \
25-
ca-certificates \
26-
wget \
27-
'; \
21+
# https://github.com/tianon/gosu/releases
22+
ENV GOSU_VERSION 1.12
23+
RUN set -eux; \
24+
savedAptMark="$(apt-mark showmanual)"; \
2825
apt-get update; \
29-
apt-get install -y --no-install-recommends $fetchDeps; \
26+
apt-get install -y --no-install-recommends ca-certificates wget; \
3027
rm -rf /var/lib/apt/lists/*; \
31-
\
3228
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
3329
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
3430
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
35-
\
36-
# verify the signature
3731
export GNUPGHOME="$(mktemp -d)"; \
3832
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
3933
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
40-
command -v gpgconf > /dev/null && gpgconf --kill all || :; \
41-
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
42-
\
34+
gpgconf --kill all; \
35+
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
36+
apt-mark auto '.*' > /dev/null; \
37+
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
38+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
4339
chmod +x /usr/local/bin/gosu; \
44-
# verify that the binary works
45-
gosu nobody true; \
46-
\
47-
apt-get purge -y --auto-remove $fetchDeps
40+
gosu --version; \
41+
gosu nobody true
4842

4943
RUN mkdir /docker-entrypoint-initdb.d
5044

update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare -A dpkgArchToBashbrew=(
1818
getRemoteVersion() {
1919
local version="$1"; shift # 10.3
2020
local suite="$1"; shift # bionic
21-
local dpkgArch="$1" shift # arm64
21+
local dpkgArch="$1"; shift # arm64
2222

2323
echo "$(
2424
curl -fsSL "https://ftp.osuosl.org/pub/mariadb/repo/$version/ubuntu/dists/$suite/main/binary-$dpkgArch/Packages" 2>/dev/null \

0 commit comments

Comments
 (0)