mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-06-12 04:47:26 +02:00
Fixed apt-key deprecation warnings for Ubuntu web images
This commit is contained in:
parent
f2d61c731a
commit
438f30e62c
@ -48,25 +48,21 @@ RUN set -eux && \
|
|||||||
INSTALL_TEMP_PKGS="gpg \
|
INSTALL_TEMP_PKGS="gpg \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
|
curl \
|
||||||
gpg-agent" && \
|
gpg-agent" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||||
--no-install-recommends install \
|
--no-install-recommends install \
|
||||||
${INSTALL_TEMP_PKGS} && \
|
${INSTALL_TEMP_PKGS} && \
|
||||||
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME && \
|
||||||
found=''; \
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx.gpg && \
|
||||||
for server in \
|
gpg --dry-run --quiet --import --import-options import-show /etc/apt/trusted.gpg.d/nginx.gpg && \
|
||||||
ha.pool.sks-keyservers.net \
|
|
||||||
hkp://keyserver.ubuntu.com:80 \
|
|
||||||
hkp://p80.pool.sks-keyservers.net:80 \
|
|
||||||
pgp.mit.edu \
|
|
||||||
; do \
|
|
||||||
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
|
|
||||||
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
|
|
||||||
done; \
|
|
||||||
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
|
||||||
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
||||||
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
echo "deb http://nginx.org/packages/ubuntu $DISTRIB_CODENAME nginx" > /etc/apt/sources.list.d/nginx.list && \
|
||||||
|
echo "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
|
||||||
|
> /etc/apt/preferences.d/99nginx && \
|
||||||
|
gpgconf --kill all && \
|
||||||
|
rm -rf "$GNUPGHOME" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||||
-o Dpkg::Options::="--force-confdef" \
|
-o Dpkg::Options::="--force-confdef" \
|
||||||
|
@ -48,25 +48,21 @@ RUN set -eux && \
|
|||||||
INSTALL_TEMP_PKGS="gpg \
|
INSTALL_TEMP_PKGS="gpg \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
|
curl \
|
||||||
gpg-agent" && \
|
gpg-agent" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||||
--no-install-recommends install \
|
--no-install-recommends install \
|
||||||
${INSTALL_TEMP_PKGS} && \
|
${INSTALL_TEMP_PKGS} && \
|
||||||
NGINX_GPGKEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62; \
|
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME && \
|
||||||
found=''; \
|
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor > /etc/apt/trusted.gpg.d/nginx.gpg && \
|
||||||
for server in \
|
gpg --dry-run --quiet --import --import-options import-show /etc/apt/trusted.gpg.d/nginx.gpg && \
|
||||||
ha.pool.sks-keyservers.net \
|
|
||||||
hkp://keyserver.ubuntu.com:80 \
|
|
||||||
hkp://p80.pool.sks-keyservers.net:80 \
|
|
||||||
pgp.mit.edu \
|
|
||||||
; do \
|
|
||||||
echo "Fetching GPG key $NGINX_GPGKEY from $server"; \
|
|
||||||
apt-key adv --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$NGINX_GPGKEY" && found=yes && break; \
|
|
||||||
done; \
|
|
||||||
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
|
|
||||||
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
|
||||||
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
|
echo "deb http://nginx.org/packages/ubuntu $DISTRIB_CODENAME nginx" > /etc/apt/sources.list.d/nginx.list && \
|
||||||
|
echo "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
|
||||||
|
> /etc/apt/preferences.d/99nginx && \
|
||||||
|
gpgconf --kill all && \
|
||||||
|
rm -rf "$GNUPGHOME" && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
DEBIAN_FRONTEND=noninteractive apt-get -y \
|
||||||
-o Dpkg::Options::="--force-confdef" \
|
-o Dpkg::Options::="--force-confdef" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user