diff --git a/build_debian.sh b/build_debian.sh index d69a19a0a7..d1fb84243d 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -256,24 +256,19 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install apparmor sudo cp files/image_config/ntp/ntp-apparmor $FILESYSTEM_ROOT/etc/apparmor.d/local/usr.sbin.ntpd sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install apt-transport-https \ ca-certificates \ - curl \ - gnupg2 \ - software-properties-common + curl if [[ $CONFIGURED_ARCH == armhf ]]; then # update ssl ca certificates for secure pem sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT c_rehash fi sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT curl -o /tmp/docker.asc -fsSL https://download.docker.com/linux/debian/gpg sudo LANG=C chroot $FILESYSTEM_ROOT mv /tmp/docker.asc /etc/apt/trusted.gpg.d/ -sudo LANG=C chroot $FILESYSTEM_ROOT add-apt-repository \ - "deb [arch=$CONFIGURED_ARCH] https://download.docker.com/linux/debian $IMAGE_DISTRO stable" +sudo tee $FILESYSTEM_ROOT/etc/apt/sources.list.d/docker.list >/dev/null < /etc/apt/sources.list.d/sonic_debian_extension.list - LANG=C DEBIAN_FRONTEND=noninteractive apt-get update + LANG=C DEBIAN_FRONTEND=noninteractive apt-get -o Acquire::Retries=1 update LANG=C DEBIAN_FRONTEND=noninteractive apt-get -o DPkg::Path=$PATH:/usr/local/bin -y install /host/image-$SONIC_VERSION/platform/$platform/*.deb # Cleanup rm -f /etc/apt/sources.list.d/sonic_debian_extension.list