File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change 11FROM alpine:3.14
22
33RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
4- RUN apk add --no-cache tzdata bash ca-certificates gnupg run-parts && \
4+ RUN apk add --no-cache tzdata bash ca-certificates gnupg run-parts su-exec && \
55 update-ca-certificates
66
77RUN addgroup -S -g 1000 influxdb && \
88 adduser -S -G influxdb -u 1000 -h /home/influxdb -s /bin/sh influxdb && \
99 mkdir -p /home/influxdb && \
1010 chown -R influxdb:influxdb /home/influxdb
1111
12- # Install gosu for easy step-down from root.
13- # https://github.com/tianon/gosu/releases
14- ENV GOSU_VER 1.12
15- RUN set -eux; \
16- ARCH="$(apk --print-arch)" && \
17- case "${ARCH}" in \
18- x86_64) ARCH=amd64;; \
19- aarch64) ARCH=arm64;; \
20- *) echo "Unsupported architecture: ${ARCH}" ; exit 1;; \
21- esac && \
22- wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$ARCH" ; \
23- wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$ARCH.asc" ; \
24- export GNUPGHOME="$(mktemp -d)" ; \
25- gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
26- gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
27- gpgconf --kill all; \
28- rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
29- chmod +x /usr/local/bin/gosu; \
30- gosu --version; \
31- gosu nobody true
32-
3312# Install the infuxd server
3413ENV INFLUXDB_VERSION 2.2.0
3514RUN set -eux && \
Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ function main () {
386386 fi
387387
388388 if [ " $( id -u) " = 0 ]; then
389- exec gosu influxdb " $BASH_SOURCE " " ${@ } "
389+ exec su-exec influxdb " $BASH_SOURCE " " ${@ } "
390390 return
391391 fi
392392
You can’t perform that action at this time.
0 commit comments