From b4b7c8eea0690d0406a5ffc2d3404c8c42457a2d Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 10 Jan 2017 15:26:14 -0800 Subject: [PATCH] Use "/etc/apt/trusted.gpg.d" instead of "apt-key adv" > Note: Instead of using this command a keyring should be placed > directly in the /etc/apt/trusted.gpg.d/ directory with a > descriptive name and either "gpg" or "asc" as file extension. https://manpages.debian.org/cgi-bin/man.cgi?query=apt-key&manpath=Debian+testing+stretch --- 5.6/Dockerfile | 8 +++++++- 5.7/Dockerfile | 8 +++++++- 8.0/Dockerfile | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/5.6/Dockerfile b/5.6/Dockerfile index f9523a562..34cb0e17b 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -26,8 +26,14 @@ RUN mkdir /docker-entrypoint-initdb.d # Data::Dumper RUN apt-get update && apt-get install -y perl pwgen --no-install-recommends && rm -rf /var/lib/apt/lists/* +RUN set -ex; \ # gpg: key 5072E1F5: public key "MySQL Release Engineering " imported -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 + key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list > /dev/null ENV MYSQL_MAJOR 5.6 ENV MYSQL_VERSION 5.6.35-1debian8 diff --git a/5.7/Dockerfile b/5.7/Dockerfile index f883a7672..94fd1e0de 100644 --- a/5.7/Dockerfile +++ b/5.7/Dockerfile @@ -26,8 +26,14 @@ RUN mkdir /docker-entrypoint-initdb.d # Data::Dumper RUN apt-get update && apt-get install -y perl pwgen --no-install-recommends && rm -rf /var/lib/apt/lists/* +RUN set -ex; \ # gpg: key 5072E1F5: public key "MySQL Release Engineering " imported -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 + key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list > /dev/null ENV MYSQL_MAJOR 5.7 ENV MYSQL_VERSION 5.7.17-1debian8 diff --git a/8.0/Dockerfile b/8.0/Dockerfile index 28f1fc94c..6bf14295d 100644 --- a/8.0/Dockerfile +++ b/8.0/Dockerfile @@ -26,8 +26,14 @@ RUN mkdir /docker-entrypoint-initdb.d # Data::Dumper RUN apt-get update && apt-get install -y perl pwgen --no-install-recommends && rm -rf /var/lib/apt/lists/* +RUN set -ex; \ # gpg: key 5072E1F5: public key "MySQL Release Engineering " imported -RUN apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 + key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + gpg --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \ + rm -r "$GNUPGHOME"; \ + apt-key list > /dev/null ENV MYSQL_MAJOR 8.0 ENV MYSQL_VERSION 8.0.0-dmr-1debian8