Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add influx-cli image #554

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions influx-cli/2.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM buildpack-deps:buster-curl

# Install the influx CLI
ENV INFLUX_CLI_VERSION 2.2.1
RUN set -eux && \
ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
case "${dpkgArch##*-}" in \
amd64) ARCH='amd64';; \
arm64) ARCH='arm64';; \
*) echo "Unsupported architecture: ${dpkgArch}"; exit 1;; \
esac && \
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 --batch --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"]
32 changes: 32 additions & 0 deletions influx-cli/2.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM alpine:3.14
alespour marked this conversation as resolved.
Show resolved Hide resolved

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"]
16 changes: 16 additions & 0 deletions influx-cli/2.2/alpine/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -eo pipefail


## READ ME
##
## This script handles a few use-cases:
## 1. Running subcommands of `influx`
##


function main () {
influx "${@}"
}

main "${@}"
16 changes: 16 additions & 0 deletions influx-cli/2.2/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -eo pipefail


## READ ME
##
## This script handles a few use-cases:
## 1. Running subcommands of `influx`
##


function main () {
influx "${@}"
}

main "${@}"
11 changes: 11 additions & 0 deletions influx-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# About this Repo

This is the Git repo of the Docker [official image](https://docs.docker.com/docker-hub/official_repos/) for [influx-cli](https://registry.hub.docker.com/_/influx-cli/). See [the Docker Hub page](https://registry.hub.docker.com/_/influx-cli/) for the full readme on how to use this Docker image and for information regarding contributing and issues.

The full readme is generated over in [docker-library/docs](https://github.com/docker-library/docs), specifically in [docker-library/docs/influx-cli](https://github.com/docker-library/docs/tree/master/influx-cli).

See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/influx-cli" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/influx-cli), especially [PRs with the "library/influx-cli" label on that repo](https://github.com/docker-library/official-images/labels/library%2Finflux-cli). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md).

[![CircleCI](https://circleci.com/gh/influxdata/influxdata-docker.svg?style=svg)](https://circleci.com/gh/influxdata/influxdata-docker)

<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->