[FIX] Odoo 10.0-12.0: use a more secure way to download keys
At build time, curl is used to download gnupg keys without any verification. This does not meet the Docker hub requirements: https://github.com/docker-library/official-images#security With this commit, gpg is used to download the keys with the best method specified in the requirements.
This commit is contained in:
+6
-1
@@ -10,6 +10,7 @@ RUN set -x; \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
dirmngr \
|
||||
fonts-noto-cjk \
|
||||
gnupg \
|
||||
libssl1.0-dev \
|
||||
@@ -31,7 +32,11 @@ RUN set -x; \
|
||||
# install latest postgresql-client
|
||||
RUN set -x; \
|
||||
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > etc/apt/sources.list.d/pgdg.list \
|
||||
&& curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
|
||||
&& export GNUPGHOME="$(mktemp -d)" \
|
||||
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys ACCC4CF8 \
|
||||
&& gpg --armor --export ACCC4CF8 | apt-key add - \
|
||||
&& gpgconf --kill all \
|
||||
&& rm -rf "$GNUPGHOME" \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y postgresql-client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user