diff --git a/influxdb/2.0/Dockerfile b/influxdb/2.0/Dockerfile index 9f0d75b2d..56ca45601 100644 --- a/influxdb/2.0/Dockerfile +++ b/influxdb/2.0/Dockerfile @@ -5,6 +5,12 @@ RUN groupadd -r influxdb --gid=1000 && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 + # Install gosu for easy step-down from root. # https://github.com/tianon/gosu/releases ENV GOSU_VER 1.12 @@ -12,11 +18,7 @@ RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch" && \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch.asc" && \ - export GNUPGHOME="$(mktemp -d)" && \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ chmod +x /usr/local/bin/gosu && \ gosu --version && \ gosu nobody true @@ -31,17 +33,20 @@ RUN set -eux && \ esac && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ - gpgconf --kill all && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influx* /usr/local/bin/ && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.0/alpine/Dockerfile b/influxdb/2.0/alpine/Dockerfile index 49efc3189..49172b05d 100644 --- a/influxdb/2.0/alpine/Dockerfile +++ b/influxdb/2.0/alpine/Dockerfile @@ -9,6 +9,11 @@ RUN addgroup -S -g 1000 influxdb && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A + ENV INFLUXDB_VERSION 2.0.9 RUN set -eux && \ ARCH="$(apk --print-arch)" && \ @@ -21,17 +26,20 @@ RUN set -eux && \ fi && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ - gpgconf --kill all && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influx* /usr/local/bin/ && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.1/Dockerfile b/influxdb/2.1/Dockerfile index c38feff62..ce7d1f69d 100644 --- a/influxdb/2.1/Dockerfile +++ b/influxdb/2.1/Dockerfile @@ -5,6 +5,12 @@ RUN groupadd -r influxdb --gid=1000 && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 + # Install gosu for easy step-down from root. # https://github.com/tianon/gosu/releases ENV GOSU_VER 1.12 @@ -12,11 +18,7 @@ RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch" && \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch.asc" && \ - export GNUPGHOME="$(mktemp -d)" && \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ chmod +x /usr/local/bin/gosu && \ gosu --version && \ gosu nobody true @@ -32,14 +34,9 @@ RUN set -eux && \ esac && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -53,16 +50,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.1/alpine/Dockerfile b/influxdb/2.1/alpine/Dockerfile index 260a8fb66..be0e2bbb3 100644 --- a/influxdb/2.1/alpine/Dockerfile +++ b/influxdb/2.1/alpine/Dockerfile @@ -9,7 +9,12 @@ RUN addgroup -S -g 1000 influxdb && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb -# Install the infuxd server +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A + +# Install the influxd server ENV INFLUXDB_VERSION 2.1.1 RUN set -eux && \ ARCH="$(apk --print-arch)" && \ @@ -22,14 +27,9 @@ RUN set -eux && \ fi && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -45,16 +45,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.2/Dockerfile b/influxdb/2.2/Dockerfile index ece8710c9..977b21b41 100644 --- a/influxdb/2.2/Dockerfile +++ b/influxdb/2.2/Dockerfile @@ -5,6 +5,12 @@ RUN groupadd -r influxdb --gid=1000 && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 + # Install gosu for easy step-down from root. # https://github.com/tianon/gosu/releases ENV GOSU_VER 1.12 @@ -12,11 +18,7 @@ RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch" && \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch.asc" && \ - export GNUPGHOME="$(mktemp -d)" && \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ chmod +x /usr/local/bin/gosu && \ gosu --version && \ gosu nobody true @@ -32,14 +34,9 @@ RUN set -eux && \ esac && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -53,16 +50,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.2/alpine/Dockerfile b/influxdb/2.2/alpine/Dockerfile index 3baff7512..3041c4ec3 100644 --- a/influxdb/2.2/alpine/Dockerfile +++ b/influxdb/2.2/alpine/Dockerfile @@ -9,6 +9,11 @@ RUN addgroup -S -g 1000 influxdb && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A + # Install the infuxd server ENV INFLUXDB_VERSION 2.2.0 RUN set -eux && \ @@ -22,14 +27,9 @@ RUN set -eux && \ fi && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -45,16 +45,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.3/Dockerfile b/influxdb/2.3/Dockerfile index 0a3d97936..f55496322 100644 --- a/influxdb/2.3/Dockerfile +++ b/influxdb/2.3/Dockerfile @@ -5,6 +5,12 @@ RUN groupadd -r influxdb --gid=1000 && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 + # Install gosu for easy step-down from root. # https://github.com/tianon/gosu/releases ENV GOSU_VER 1.12 @@ -12,11 +18,7 @@ RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch" && \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch.asc" && \ - export GNUPGHOME="$(mktemp -d)" && \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ chmod +x /usr/local/bin/gosu && \ gosu --version && \ gosu nobody true @@ -32,14 +34,9 @@ RUN set -eux && \ esac && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2_linux_${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -53,16 +50,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.3/alpine/Dockerfile b/influxdb/2.3/alpine/Dockerfile index 991698d72..d7a1d163a 100644 --- a/influxdb/2.3/alpine/Dockerfile +++ b/influxdb/2.3/alpine/Dockerfile @@ -9,6 +9,11 @@ RUN addgroup -S -g 1000 influxdb && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A + # Install the infuxd server ENV INFLUXDB_VERSION 2.3.0 RUN set -eux && \ @@ -22,14 +27,9 @@ RUN set -eux && \ fi && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2_linux_${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -45,16 +45,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.4/Dockerfile b/influxdb/2.4/Dockerfile index c996cec8e..055bf33de 100644 --- a/influxdb/2.4/Dockerfile +++ b/influxdb/2.4/Dockerfile @@ -5,6 +5,12 @@ RUN groupadd -r influxdb --gid=1000 && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 + # Install gosu for easy step-down from root. # https://github.com/tianon/gosu/releases ENV GOSU_VER 1.12 @@ -12,11 +18,7 @@ RUN set -eux; \ dpkgArch="$(dpkg --print-architecture)" && \ wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch" && \ wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VER/gosu-$dpkgArch.asc" && \ - export GNUPGHOME="$(mktemp -d)" && \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc && \ chmod +x /usr/local/bin/gosu && \ gosu --version && \ gosu nobody true @@ -32,14 +34,9 @@ RUN set -eux && \ esac && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2_linux_${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -53,16 +50,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \ diff --git a/influxdb/2.4/alpine/Dockerfile b/influxdb/2.4/alpine/Dockerfile index aade1c593..d364e07b0 100644 --- a/influxdb/2.4/alpine/Dockerfile +++ b/influxdb/2.4/alpine/Dockerfile @@ -9,6 +9,11 @@ RUN addgroup -S -g 1000 influxdb && \ mkdir -p /home/influxdb && \ chown -R influxdb:influxdb /home/influxdb +# Configure GNUPG +RUN mkdir -p /root/.gnupg && chmod 700 /root/.gnupg && \ + echo "disable-ipv6" >> /root/.gnupg/dirmngr.conf && \ + gpg --batch --keyserver keys.openpgp.org --recv-keys 8C2D403D3C3BDB81A4C27C883C3E4B7317FFE40A + # Install the infuxd server ENV INFLUXDB_VERSION 2.4.0 RUN set -eux && \ @@ -22,14 +27,9 @@ RUN set -eux && \ fi && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc && \ wget --no-verbose https://dl.influxdata.com/influxdb/releases/influxdb2-${INFLUXDB_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-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz.asc influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ tar xzf influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}.tar.gz && \ cp influxdb2_linux_${ARCH}/influxd /usr/local/bin/influxd && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* && \ influxd version # Install the influx CLI @@ -45,16 +45,19 @@ RUN set -eux && \ 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 && \ - gpgconf --kill all && \ - rm -rf "$GNUPGHOME" influxdb2.key influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* && \ influx version +# Remove GNUPG Configuration +RUN gpgconf --kill all && \ + rm -rf \ + "/root/.gnupg" \ + influxdb2.key \ + influxdb2-${INFLUXDB_VERSION}-linux-${ARCH}* \ + influxdb2-client-${INFLUX_CLI_VERSION}-linux-${ARCH}* + # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ mkdir -p /var/lib/influxdb2 && \