[Build] Support j2 template for debian sources for docker ptf (#13198)

Change to use the sources.list from the file generated from the j2 template
This commit is contained in:
xumia 2022-12-30 15:33:21 +08:00 committed by GitHub
parent 86a5a7f1ea
commit 38c5d7fcec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -14,14 +14,14 @@ WORKDIR /root
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 \

View File

@ -38,7 +38,7 @@ if [ -z "$DISTRO" ]; then
fi
fi
if [[ "$IMAGENAME" == docker-base-* ]]; then
if [[ "$IMAGENAME" == docker-base-* ]] || [[ "$IMAGENAME" == docker-ptf ]]; then
scripts/build_mirror_config.sh ${DOCKERFILE_PATH} $ARCH $DISTRO
fi