Skip to content

Commit

Permalink
Merge pull request #234 from apache/remove-gosu
Browse files Browse the repository at this point in the history
replace gosu with setpriv
  • Loading branch information
janl authored Mar 17, 2023
2 parents 9453eee + bf802ba commit bdaa368
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
5 changes: 2 additions & 3 deletions 3.2.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 3.2.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ EOWARN
fi

if [ "$(id -u)" = '0' ]; then
exec gosu couchdb "$@"
exec setpriv --reuid=couchdb --regid=couchdb --clear-groups "$@"
fi
fi

Expand Down
5 changes: 2 additions & 3 deletions 3.3.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion 3.3.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ EOWARN
fi

if [ "$(id -u)" = '0' ]; then
exec gosu couchdb "$@"
exec setpriv --reuid=couchdb --regid=couchdb --clear-groups "$@"
fi
fi

Expand Down
5 changes: 2 additions & 3 deletions dev-cluster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
6 changes: 2 additions & 4 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@ 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
Expand Down
2 changes: 1 addition & 1 deletion dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ EOWARN
fi


exec gosu couchdb "$@"
exec setpriv --reuid=couchdb --regid=couchdb --clear-groups "$@"
fi

exec "$@"

0 comments on commit bdaa368

Please sign in to comment.