Skip to content

Commit

Permalink
fix: use hardcoded UID/GID for influxdb:influxdb
Browse files Browse the repository at this point in the history
  • Loading branch information
bnpfeife committed Oct 26, 2024
1 parent aa5f51f commit ca10bb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion influxdb/1.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
FROM buildpack-deps:bookworm-curl

RUN addgroup --system --gid 1500 influxdb && \
adduser --system --uid 1500 --ingroup influxdb --home /var/lib/influxdb --shell /bin/false influxdb

ARG INFLUXDB_VERSION=1.11.7
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E && \
RUN gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
case "$(dpkg --print-architecture)" in \
Expand Down
6 changes: 3 additions & 3 deletions influxdb/1.11/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apk add --no-cache --virtual .build-deps \
curl \
gnupg \
tar && \
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E && \
gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys 9D539D90D3328DC7D6C8D3B9D8FF8E1F7DF8B07E && \
case "$(apk --print-arch)" in \
x86_64) ARCH=amd64 ;; \
aarch64) ARCH=arm64 ;; \
Expand All @@ -31,8 +31,8 @@ RUN apk add --no-cache --virtual .build-deps \
apk del .build-deps
COPY influxdb.conf /etc/influxdb/influxdb.conf

RUN addgroup influxdb && \
adduser -S -s /bin/false -h /var/lib/influxdb -G influxdb influxdb && \
RUN addgroup --system --gid 1500 influxdb && \
adduser --system --uid 1500 --ingroup influxdb --home /var/lib/influxdb --shell /bin/false influxdb && \
mkdir -p /var/lib/influxdb && \
mkdir -p /var/log/influxdb && \
chown influxdb:influxdb /var/lib/influxdb && \
Expand Down

0 comments on commit ca10bb6

Please sign in to comment.