Skip to content

Commit 737a50e

Browse files
liushilongbuaaxumia
authored andcommitted
[build] Fix issues caused by docker.com gpg key update. (sonic-net#14063)
Why I did it docker.com's gpg key start to work from 2023-02-23. While debian.org's gpg key expired in 2022-11. We used a walkaround for security checking for debian gpg keys. Now we need to exclude docker.com's gpg key. How I did it Update docker.com's gpg key without faketime. Update others' gpg key with faketime '2022-11' How to verify it
1 parent e9dc0cc commit 737a50e

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

sonic-slave/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,11 @@ RUN apt-get install -y \
332332
gnupg2 \
333333
software-properties-common
334334
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
335-
RUN add-apt-repository \
336-
"deb [arch=amd64] https://download.docker.com/linux/debian \
337-
$(lsb_release -cs) \
338-
stable"
339-
RUN faketime "2022-11-01" apt-get update
335+
RUN echo "deb [arch={{ CONFIGURED_ARCH }}] https://download.docker.com/linux/debian $(lsb_release -cs) stable" >> /etc/apt/sources.list.d/docker.list
336+
337+
RUN apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list"
340338
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
339+
RUN rm /etc/apt/sources.list.d/docker.list
341340
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
342341

343342
# Remove the stale cert and refresh the certs

0 commit comments

Comments
 (0)