Skip to content

Commit

Permalink
fix: resolve gnupg dirmngr issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bnpfeife committed Aug 18, 2022
1 parent 1a8c080 commit 7047631
Show file tree
Hide file tree
Showing 10 changed files with 136 additions and 111 deletions.
23 changes: 14 additions & 9 deletions influxdb/2.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ 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
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
Expand All @@ -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 && \
Expand Down
18 changes: 13 additions & 5 deletions influxdb/2.0/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)" && \
Expand All @@ -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 && \
Expand Down
28 changes: 14 additions & 14 deletions influxdb/2.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ 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
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
Expand All @@ -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
Expand All @@ -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 && \
Expand Down
25 changes: 14 additions & 11 deletions influxdb/2.1/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)" && \
Expand All @@ -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
Expand All @@ -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 && \
Expand Down
28 changes: 14 additions & 14 deletions influxdb/2.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ 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
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
Expand All @@ -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
Expand All @@ -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 && \
Expand Down
23 changes: 13 additions & 10 deletions influxdb/2.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand All @@ -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 && \
Expand Down
Loading

0 comments on commit 7047631

Please sign in to comment.