Skip to content

Commit

Permalink
Dockerfile: migrate to trusted.gpg.d for docker repo keys (#3090)
Browse files Browse the repository at this point in the history
Using apt-key for managing Debian repo keys has been deprecated for a
while now. While it currently works ok, seems to be broken in bookworm. This migrates to storing keys in trusted.gpg.d as recommended by the warning messages when using apt-key.
  • Loading branch information
darkxst authored Jan 19, 2024
1 parent 3aa2c1e commit c210a1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gpg \
dirmngr \
software-properties-common \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/trusted.gpg.d/docker.gpg] \
https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list \
&& apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
&& rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit c210a1a

Please sign in to comment.