From 3f6d535dfc687502aad5bdce3acd6442d13d69c2 Mon Sep 17 00:00:00 2001 From: Timi7007 <timi7007@googlemail.com> Date: Fri, 19 May 2023 02:33:21 +0200 Subject: [PATCH] Replaced deprecated apt-key, automated OS-based download --- Dockerfile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ca4739..df8a267 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,13 @@ FROM debian:bullseye-slim # Install requirements -RUN apt-get update && \ - apt-get install -y gnupg +RUN apt-get update && apt-get install -y gnupg -# add the deb source -# add the signing key -# apt update -# install the aprsc debian package -RUN echo "deb http://aprsc-dist.he.fi/aprsc/apt bullseye main" > /etc/apt/sources.list.d/aprsc.list && \ - gpg --keyserver keyserver.ubuntu.com --recv C51AA22389B5B74C3896EF3CA72A581E657A2B8D && \ - gpg --export C51AA22389B5B74C3896EF3CA72A581E657A2B8D | apt-key add - && \ +# add signing key and deb source, install aprsc +RUN gpg --keyserver keyserver.ubuntu.com --recv-keys C51AA22389B5B74C3896EF3CA72A581E657A2B8D && \ + gpg --export C51AA22389B5B74C3896EF3CA72A581E657A2B8D > /etc/apt/trusted.gpg.d/aprsc.gpg && \ + chown root:root /etc/apt/trusted.gpg.d/aprsc.gpg && chmod 644 /etc/apt/trusted.gpg.d/aprsc.gpg && \ + echo "deb [signed-by=/etc/apt/trusted.gpg.d/aprsc.gpg] http://aprsc-dist.he.fi/aprsc/apt $(cat /etc/os-release | grep VERSION_CODENAME | awk '{gsub("VERSION_CODENAME=", "");print}') main" > /etc/apt/sources.list.d/aprsc.list && \ apt-get update && \ apt-get install -y aprsc -- GitLab