From 60a9843b835949bb33bd8a0f61c259cf5e41a8c3 Mon Sep 17 00:00:00 2001 From: Johannes Jordan Date: Mon, 22 Aug 2022 09:58:18 +0200 Subject: [PATCH] Remove all intermediate files in same layers - Remove untarred files that were previously missed by glob - Remove files in layer they originate from This is in line with the approach in telegraf's Dockerfiles --- influxdb/2.3/Dockerfile | 6 +++--- influxdb/2.3/alpine/Dockerfile | 6 +++--- influxdb/2.4/Dockerfile | 6 +++--- influxdb/2.4/alpine/Dockerfile | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/influxdb/2.3/Dockerfile b/influxdb/2.3/Dockerfile index f55496322..da342a159 100644 --- a/influxdb/2.3/Dockerfile +++ b/influxdb/2.3/Dockerfile @@ -37,6 +37,7 @@ RUN set -eux && \ 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 && \ + rm -rf influxdb2-* && \ influxd version # Install the influx CLI @@ -53,15 +54,14 @@ RUN set -eux && \ 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 influxdb2-* && \ 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}* + influxdb2.key # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ diff --git a/influxdb/2.3/alpine/Dockerfile b/influxdb/2.3/alpine/Dockerfile index d7a1d163a..9b022c1dc 100644 --- a/influxdb/2.3/alpine/Dockerfile +++ b/influxdb/2.3/alpine/Dockerfile @@ -30,6 +30,7 @@ RUN set -eux && \ 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 && \ + rm -rf influxdb2-* && \ influxd version # Install the influx CLI @@ -48,15 +49,14 @@ RUN set -eux && \ 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 influxdb2-* && \ 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}* + influxdb2.key # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ diff --git a/influxdb/2.4/Dockerfile b/influxdb/2.4/Dockerfile index 055bf33de..dd5d0362d 100644 --- a/influxdb/2.4/Dockerfile +++ b/influxdb/2.4/Dockerfile @@ -37,6 +37,7 @@ RUN set -eux && \ 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 && \ + rm -rf influxdb2-* && \ influxd version # Install the influx CLI @@ -53,15 +54,14 @@ RUN set -eux && \ 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 influxdb2-* && \ 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}* + influxdb2.key # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \ diff --git a/influxdb/2.4/alpine/Dockerfile b/influxdb/2.4/alpine/Dockerfile index d364e07b0..91672b76a 100644 --- a/influxdb/2.4/alpine/Dockerfile +++ b/influxdb/2.4/alpine/Dockerfile @@ -30,6 +30,7 @@ RUN set -eux && \ 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 && \ + rm -rf influxdb2-* && \ influxd version # Install the influx CLI @@ -48,15 +49,14 @@ RUN set -eux && \ 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 influxdb2-* && \ 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}* + influxdb2.key # Create standard directories expected by the entry-point. RUN mkdir /docker-entrypoint-initdb.d && \