[build][arm64] fix debian source for arm64 bullseye docker image (#12778)
Why I did it arm64 bullseye docker image source is set to jessie for VERSION_CODENAME is miss. shil@localhost:~/sonic-buildimage$ docker run -it multiarch/debian-debootstrap:arm64-bullseye bash root@b2e2fea86e2d:/# cat /etc/os-release | grep VERSION_CODENAME | cut -d= -f2 root@b2e2fea86e2d:/# cat /etc/os-release PRETTY_NAME="Debian GNU/Linux bullseye/sid" NAME="Debian GNU/Linux" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" How I did it if DISTRO is NULL, find it in /etc/apt/sources.list root@b2e2fea86e2d:/# cat /etc/apt/sources.list | grep deb.debian.org | awk '{print $3}' bullseye root@b2e2fea86e2d:/# cat /etc/apt/sources.list deb http://deb.debian.org/debian bullseye main root@b2e2fea86e2d:/#
This commit is contained in:
parent
c154b68b61
commit
3ef7b560ec
@ -20,7 +20,10 @@ mkdir -p $BUILDINFO_VERSION_PATH
|
||||
if [ -z "$DISTRO" ]; then
|
||||
DOCKER_BASE_IMAGE=$(grep "^FROM" $DOCKERFILE | head -n 1 | awk '{print $2}')
|
||||
DISTRO=$(docker run --rm --entrypoint "" $DOCKER_BASE_IMAGE cat /etc/os-release | grep VERSION_CODENAME | cut -d= -f2)
|
||||
[ -z "$DISTRO" ] && DISTRO=jessie
|
||||
if [ -z "$DISTRO" ]; then
|
||||
DISTRO=$(docker run --rm --entrypoint "" $DOCKER_BASE_IMAGE cat /etc/apt/sources.list | grep deb.debian.org | awk '{print $3}')
|
||||
[ -z "$DISTRO" ] && DISTRO=jessie
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$IMAGENAME" == docker-base-* ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user