Dockerfile: migrate to trusted.gpg.d for docker repo keys (#3090)
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.
This commit is contained in:
parent
3aa2c1e411
commit
c210a1a52a
|
@ -12,8 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
gpg \
|
gpg \
|
||||||
dirmngr \
|
dirmngr \
|
||||||
software-properties-common \
|
software-properties-common \
|
||||||
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
|
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg \
|
||||||
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
|
&& 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 \
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
Loading…
Reference in New Issue