-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (28 loc) · 1.43 KB
/
Dockerfile
File metadata and controls
32 lines (28 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM alpine:3.15
RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
RUN apk add --no-cache tzdata bash ca-certificates gnupg run-parts && \
update-ca-certificates
# Install the influx CLI
ENV INFLUX_CLI_VERSION 2.2.1
RUN set -eux && \
ARCH="$(apk --print-arch)" && \
if [ ${ARCH} = x86_64 ]; then \
ARCH=amd64; \
elif [ ${ARCH} = aarch64 ]; then \
ARCH=arm64; \
else \
echo "Unsupported architecture: ${ARCH}" && exit 1; \
fi && \
wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}.tar.gz.asc && \
wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}.tar.gz && \
export GNUPGHOME="$(mktemp -d)" && \
echo "disable-ipv6" >> $GNUPGHOME/dirmngr.conf && \
gpg --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \
gpg --batch --verify influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}.tar.gz && \
tar xzf influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}.tar.gz && \
cp influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}/influx /usr/local/bin/influx && \
rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \
influx version
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["version"]