[Build] Fix the installation candidate not found issue when building docker-sonic-vs (#14439)

Why I did it
Fix the installation candidate not found issue when building docker-sonic-vs

How I did it
Need to run the command "apt-get update" to update the mirror indexes before installing the package gnupg

How to verify it
This commit is contained in:
xumia 2023-03-28 14:04:33 +08:00 committed by GitHub
parent 9726ec8420
commit 320366ab60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ RUN [ -f /etc/rsyslog.conf ] && sed -ri "s/%syslogtag%/$docker_container_name#%s
## Make apt-get non-interactive ## Make apt-get non-interactive
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y gnupg RUN apt-get update && apt-get install -y gnupg
COPY ["sonic-dev.gpg.key", "/etc/apt/"] COPY ["sonic-dev.gpg.key", "/etc/apt/"]
RUN apt-key add /etc/apt/sonic-dev.gpg.key RUN apt-key add /etc/apt/sonic-dev.gpg.key
RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /etc/apt/sources.list RUN echo "deb http://packages.microsoft.com/repos/sonic-dev/ jessie main" >> /etc/apt/sources.list