Skip to content

Commit e8dac53

Browse files
committed
[jenkins-with-docker] Use the new official Docker guide for Debian
1 parent 756bbe5 commit e8dac53

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

dockerfiles/jenkins-with-docker

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ RUN apt-get install -y \
2121
sudo \
2222
&& apt-get clean -y
2323

24-
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
25-
RUN add-apt-repository \
26-
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu \
27-
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") \
28-
stable"
24+
RUN install -m 0755 -d /etc/apt/keyrings
25+
&& curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
26+
&& chmod a+r /etc/apt/keyrings/docker.asc
27+
28+
RUN echo \
29+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
30+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
31+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
2932

3033
RUN apt-get update \
3134
&& apt-get install -y docker-ce \

0 commit comments

Comments
 (0)