diff --git a/dockers/docker-ptf/Dockerfile.j2 b/dockers/docker-ptf/Dockerfile.j2 index d999d01e0026..ce9b91c1cecf 100644 --- a/dockers/docker-ptf/Dockerfile.j2 +++ b/dockers/docker-ptf/Dockerfile.j2 @@ -9,14 +9,14 @@ FROM {{ prefix }}debian:buster MAINTAINER Pavel Shirshov -RUN echo "deb [arch=amd64] http://debian-archive.trafficmanager.net/debian buster-backports main" >> /etc/apt/sources.list +COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"] + ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive ## Set the apt source, update package cache and install necessary packages ## TODO: Clean up this step -RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /etc/apt/sources.list \ - && apt-get update \ +RUN apt-get update \ && apt-get upgrade -y \ && apt-get dist-upgrade -y \ && apt-get install -y \ diff --git a/scripts/prepare_docker_buildinfo.sh b/scripts/prepare_docker_buildinfo.sh index 3c1104eddc53..c5547dfc3094 100755 --- a/scripts/prepare_docker_buildinfo.sh +++ b/scripts/prepare_docker_buildinfo.sh @@ -22,7 +22,7 @@ if [ -z "$DISTRO" ]; then [ -z "$DISTRO" ] && DISTRO=jessie fi -if [[ "$IMAGENAME" == docker-base-* ]]; then +if [[ "$IMAGENAME" == docker-base-* ]] || [[ "$IMAGENAME" == docker-ptf ]]; then scripts/build_mirror_config.sh ${DOCKERFILE_PATH} $ARCH $DISTRO fi