You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2023/03/17 10:55:14 UTC
[couchdb-docker] 01/01: replace gosu with setpriv
This is an automated email from the ASF dual-hosted git repository.
rnewson pushed a commit to branch remove-gosu
in repository https://gitbox.apache.org/repos/asf/couchdb-docker.git
commit 7221606222ebbf74956737efdb54aef8c8ab0636
Author: Robert Newson <rn...@apache.org>
AuthorDate: Fri Mar 17 10:55:00 2023 +0000
replace gosu with setpriv
---
2.3.1/Dockerfile | 5 ++---
2.3.1/docker-entrypoint.sh | 2 +-
3.1.2/Dockerfile | 5 ++---
3.1.2/docker-entrypoint.sh | 2 +-
3.2.0/Dockerfile | 5 ++---
3.2.0/docker-entrypoint.sh | 2 +-
3.2.1/Dockerfile | 5 ++---
3.2.1/docker-entrypoint.sh | 2 +-
3.2.2/Dockerfile | 5 ++---
3.2.2/docker-entrypoint.sh | 2 +-
3.3.0/Dockerfile | 5 ++---
3.3.0/docker-entrypoint.sh | 2 +-
3.3.1/Dockerfile | 5 ++---
3.3.1/docker-entrypoint.sh | 2 +-
dev-cluster/Dockerfile | 5 ++---
dev/Dockerfile | 5 ++---
dev/docker-entrypoint.sh | 2 +-
17 files changed, 26 insertions(+), 35 deletions(-)
diff --git a/2.3.1/Dockerfile b/2.3.1/Dockerfile
index f083992..367c5ea 100644
--- a/2.3.1/Dockerfile
+++ b/2.3.1/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/2.3.1/docker-entrypoint.sh b/2.3.1/docker-entrypoint.sh
index 6e0e2c1..caa5721 100755
--- a/2.3.1/docker-entrypoint.sh
+++ b/2.3.1/docker-entrypoint.sh
@@ -99,7 +99,7 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.1.2/Dockerfile b/3.1.2/Dockerfile
index 0260c6e..dd06692 100644
--- a/3.1.2/Dockerfile
+++ b/3.1.2/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.1.2/docker-entrypoint.sh b/3.1.2/docker-entrypoint.sh
index acf3675..bf63a06 100755
--- a/3.1.2/docker-entrypoint.sh
+++ b/3.1.2/docker-entrypoint.sh
@@ -99,7 +99,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.2.0/Dockerfile b/3.2.0/Dockerfile
index 159be0f..8e448eb 100644
--- a/3.2.0/Dockerfile
+++ b/3.2.0/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.2.0/docker-entrypoint.sh b/3.2.0/docker-entrypoint.sh
index 4b8b4f4..5a038eb 100755
--- a/3.2.0/docker-entrypoint.sh
+++ b/3.2.0/docker-entrypoint.sh
@@ -99,7 +99,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.2.1/Dockerfile b/3.2.1/Dockerfile
index 27e9d9c..8439319 100644
--- a/3.2.1/Dockerfile
+++ b/3.2.1/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.2.1/docker-entrypoint.sh b/3.2.1/docker-entrypoint.sh
index 8d6456d..50def8b 100755
--- a/3.2.1/docker-entrypoint.sh
+++ b/3.2.1/docker-entrypoint.sh
@@ -114,7 +114,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.2.2/Dockerfile b/3.2.2/Dockerfile
index 62177b5..587d152 100644
--- a/3.2.2/Dockerfile
+++ b/3.2.2/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.2.2/docker-entrypoint.sh b/3.2.2/docker-entrypoint.sh
index 8d6456d..50def8b 100755
--- a/3.2.2/docker-entrypoint.sh
+++ b/3.2.2/docker-entrypoint.sh
@@ -114,7 +114,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.3.0/Dockerfile b/3.3.0/Dockerfile
index ffb943b..502b249 100644
--- a/3.3.0/Dockerfile
+++ b/3.3.0/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.3.0/docker-entrypoint.sh b/3.3.0/docker-entrypoint.sh
index 8d6456d..50def8b 100755
--- a/3.3.0/docker-entrypoint.sh
+++ b/3.3.0/docker-entrypoint.sh
@@ -114,7 +114,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/3.3.1/Dockerfile b/3.3.1/Dockerfile
index ead4e5c..90369c9 100644
--- a/3.3.1/Dockerfile
+++ b/3.3.1/Dockerfile
@@ -28,13 +28,12 @@ RUN set -ex; \
; \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling and zombie reaping
+# grab tini for signal handling and zombie reaping
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# http://docs.couchdb.org/en/latest/install/unix.html#installing-the-apache-couchdb-packages
diff --git a/3.3.1/docker-entrypoint.sh b/3.3.1/docker-entrypoint.sh
index 8d6456d..50def8b 100755
--- a/3.3.1/docker-entrypoint.sh
+++ b/3.3.1/docker-entrypoint.sh
@@ -114,7 +114,7 @@ EOWARN
fi
if [ "$(id -u)" = '0' ]; then
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
fi
diff --git a/dev-cluster/Dockerfile b/dev-cluster/Dockerfile
index f599fec..71ca4b0 100644
--- a/dev-cluster/Dockerfile
+++ b/dev-cluster/Dockerfile
@@ -30,13 +30,12 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
openssl && \
rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling
+# grab tini for signal handling
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
RUN apt-get update -y && apt-get install -y --no-install-recommends \
diff --git a/dev/Dockerfile b/dev/Dockerfile
index 104de9d..e03b5df 100644
--- a/dev/Dockerfile
+++ b/dev/Dockerfile
@@ -31,15 +31,14 @@ RUN apt-get update -y && apt-get install -y \
&& apt-get update -y && apt-get install -y --no-install-recommends libmozjs-60-0 \
&& rm -rf /var/lib/apt/lists/*
-# grab gosu for easy step-down from root and tini for signal handling
+# grab tini for signal handling
# see https://github.com/apache/couchdb-docker/pull/28#discussion_r141112407
ENV GOSU_VERSION 1.10
ENV TINI_VERSION 0.16.1
RUN set -eux; \
apt-get update; \
- apt-get install -y --no-install-recommends gosu tini; \
+ apt-get install -y --no-install-recommends tini; \
rm -rf /var/lib/apt/lists/*; \
- gosu nobody true; \
tini --version
# Dependencies only needed during build time. This layer will also be cached
diff --git a/dev/docker-entrypoint.sh b/dev/docker-entrypoint.sh
index 95691c2..2db5024 100755
--- a/dev/docker-entrypoint.sh
+++ b/dev/docker-entrypoint.sh
@@ -104,7 +104,7 @@ EOWARN
fi
- exec gosu couchdb "$@"
+ exec setpriv --reuid=couchdb --regid=couchdb --init-groups "$@"
fi
exec "$@"