Update Dockerfile.alpine

This commit is contained in:
alexey-milovidov 2021-01-15 20:59:12 +03:00 committed by GitHub
parent c846f76ffa
commit e0c90cd20e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,14 @@ ENV LANG=en_US.UTF-8 \
COPY alpine-root/ /
# user/group precreated explicitly with fixed uid/gid on purpose (see commit)
# user/group precreated explicitly with fixed uid/gid on purpose.
# It is especially important for rootless containers: in that case entrypoint
# can't do chown and owners of mounted volumes should be configured externally.
# We do that in advance at the begining of Dockerfile before any packages will be
# installed to prevent picking those uid / gid by some unrelated software.
# The same uid / gid (101) is used both for alpine and ubuntu.
# Number 101 is used by default in openshift
RUN addgroup -S -g 101 clickhouse \
&& adduser -S -h /var/lib/clickhouse -s /bin/bash -G clickhouse -g "ClickHouse server" -u 101 clickhouse \
&& chown clickhouse:clickhouse /var/lib/clickhouse \