Skip to content

Commit b58a76d

Browse files
authored
Address final DockerHub review on InfluxDB 2.0.4 (#459)
1 parent c3c7328 commit b58a76d

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

influxdb/2.0/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN set -eux && \
3333
wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \
3434
export GNUPGHOME="$(mktemp -d)" && \
3535
echo "disable-ipv6" >> $GNUPGHOME/dirmngr.conf && \
36-
gpg --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \
36+
gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \
3737
gpg --batch --verify influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \
3838
tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \
3939
cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influx* /usr/local/bin/ && \

influxdb/2.0/alpine/Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ RUN addgroup -S -g 1000 influxdb && \
1414
ENV GOSU_VER 1.12
1515
RUN set -eux; \
1616
ARCH="$(apk --print-arch)" && \
17-
if [ ${ARCH} = x86_64 ]; then \
18-
ARCH=amd64; \
19-
elif [ ${ARCH} = aarch64 ]; then \
20-
ARCH=arm64; \
21-
else \
22-
echo "Unsupported architecture: ${ARCH}" && exit 1; \
23-
fi && \
17+
case "${ARCH}" in \
18+
x86_64) ARCH=amd64;; \
19+
aarch64) ARCH=arm64;; \
20+
*) echo "Unsupported architecture: ${ARCH}"; exit 1;; \
21+
esac && \
2422
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$ARCH"; \
2523
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$ARCH.asc"; \
2624
export GNUPGHOME="$(mktemp -d)"; \

influxdb/2.0/alpine/entrypoint.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ function set_config_path () {
5757
}
5858

5959
function set_data_paths () {
60-
export BOLT_PATH="$(influxd print-config --key-name bolt-path "${@}")"
61-
export ENGINE_PATH="$(influxd print-config --key-name engine-path "${@}")"
60+
BOLT_PATH="$(influxd print-config --key-name bolt-path "${@}")"
61+
ENGINE_PATH="$(influxd print-config --key-name engine-path "${@}")"
62+
export BOLT_PATH ENGINE_PATH
6263
}
6364

6465
# Ensure all the data directories needed by influxd exist with the right permissions.
@@ -195,9 +196,10 @@ function setup_influxd () {
195196
# Get the IDs of the initial user/org/bucket created during setup, and export them into the env.
196197
# We do this to help with arbitrary user scripts, since many influx CLI commands only take IDs.
197198
function set_init_resource_ids () {
198-
export DOCKER_INFLUXDB_INIT_USER_ID="$(influx user list -n "${DOCKER_INFLUXDB_INIT_USER}" --hide-headers | cut -f 1)"
199-
export DOCKER_INFLUXDB_INIT_ORG_ID="$(influx org list -n "${DOCKER_INFLUXDB_INIT_ORG}" --hide-headers | cut -f 1)"
200-
export DOCKER_INFLUXDB_INIT_BUCKET_ID="$(influx bucket list -n "${DOCKER_INFLUXDB_INIT_BUCKET}" --hide-headers | cut -f 1)"
199+
DOCKER_INFLUXDB_INIT_USER_ID="$(influx user list -n "${DOCKER_INFLUXDB_INIT_USER}" --hide-headers | cut -f 1)"
200+
DOCKER_INFLUXDB_INIT_ORG_ID="$(influx org list -n "${DOCKER_INFLUXDB_INIT_ORG}" --hide-headers | cut -f 1)"
201+
DOCKER_INFLUXDB_INIT_BUCKET_ID="$(influx bucket list -n "${DOCKER_INFLUXDB_INIT_BUCKET}" --hide-headers | cut -f 1)"
202+
export DOCKER_INFLUXDB_INIT_USER_ID DOCKER_INFLUXDB_INIT_ORG_ID DOCKER_INFLUXDB_INIT_BUCKET_ID
201203
}
202204

203205
# Allow users to mount arbitrary startup scripts into the container,

influxdb/2.0/entrypoint.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ function set_config_path () {
5757
}
5858

5959
function set_data_paths () {
60-
export BOLT_PATH="$(influxd print-config --key-name bolt-path "${@}")"
61-
export ENGINE_PATH="$(influxd print-config --key-name engine-path "${@}")"
60+
BOLT_PATH="$(influxd print-config --key-name bolt-path "${@}")"
61+
ENGINE_PATH="$(influxd print-config --key-name engine-path "${@}")"
62+
export BOLT_PATH ENGINE_PATH
6263
}
6364

6465
# Ensure all the data directories needed by influxd exist with the right permissions.
@@ -195,9 +196,10 @@ function setup_influxd () {
195196
# Get the IDs of the initial user/org/bucket created during setup, and export them into the env.
196197
# We do this to help with arbitrary user scripts, since many influx CLI commands only take IDs.
197198
function set_init_resource_ids () {
198-
export DOCKER_INFLUXDB_INIT_USER_ID="$(influx user list -n "${DOCKER_INFLUXDB_INIT_USER}" --hide-headers | cut -f 1)"
199-
export DOCKER_INFLUXDB_INIT_ORG_ID="$(influx org list -n "${DOCKER_INFLUXDB_INIT_ORG}" --hide-headers | cut -f 1)"
200-
export DOCKER_INFLUXDB_INIT_BUCKET_ID="$(influx bucket list -n "${DOCKER_INFLUXDB_INIT_BUCKET}" --hide-headers | cut -f 1)"
199+
DOCKER_INFLUXDB_INIT_USER_ID="$(influx user list -n "${DOCKER_INFLUXDB_INIT_USER}" --hide-headers | cut -f 1)"
200+
DOCKER_INFLUXDB_INIT_ORG_ID="$(influx org list -n "${DOCKER_INFLUXDB_INIT_ORG}" --hide-headers | cut -f 1)"
201+
DOCKER_INFLUXDB_INIT_BUCKET_ID="$(influx bucket list -n "${DOCKER_INFLUXDB_INIT_BUCKET}" --hide-headers | cut -f 1)"
202+
export DOCKER_INFLUXDB_INIT_USER_ID DOCKER_INFLUXDB_INIT_ORG_ID DOCKER_INFLUXDB_INIT_BUCKET_ID
201203
}
202204

203205
# Allow users to mount arbitrary startup scripts into the container,

0 commit comments

Comments
 (0)