From 697ee30a260c8fe15fd940ad4ce3ab22eb95d73e Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 13 Nov 2021 21:10:19 +0300 Subject: [PATCH] Add ARG REL into build Dockerfiles --- debian/build-vitastor-bullseye.sh | 4 ++-- debian/build-vitastor-buster.sh | 4 ++-- debian/patched-qemu.Dockerfile | 6 ++---- debian/vitastor.Dockerfile | 2 ++ 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debian/build-vitastor-bullseye.sh b/debian/build-vitastor-bullseye.sh index 273f18e4..c5b2bb51 100755 --- a/debian/build-vitastor-bullseye.sh +++ b/debian/build-vitastor-bullseye.sh @@ -1,7 +1,7 @@ #!/bin/bash -sed 's/$REL/bullseye/g' < vitastor.Dockerfile > ../Dockerfile +cat < vitastor.Dockerfile > ../Dockerfile cd .. mkdir -p packages -sudo podman build -v `pwd`/packages:/root/packages -f Dockerfile . +sudo podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f Dockerfile . rm Dockerfile diff --git a/debian/build-vitastor-buster.sh b/debian/build-vitastor-buster.sh index d44adb45..235ad296 100755 --- a/debian/build-vitastor-buster.sh +++ b/debian/build-vitastor-buster.sh @@ -1,7 +1,7 @@ #!/bin/bash -sed 's/$REL/buster/g' < vitastor.Dockerfile > ../Dockerfile +cat < vitastor.Dockerfile > ../Dockerfile cd .. mkdir -p packages -sudo podman build -v `pwd`/packages:/root/packages -f Dockerfile . +sudo podman build --build-arg REL=buster -v `pwd`/packages:/root/packages -f Dockerfile . rm Dockerfile diff --git a/debian/patched-qemu.Dockerfile b/debian/patched-qemu.Dockerfile index e43f2068..d815dbe7 100644 --- a/debian/patched-qemu.Dockerfile +++ b/debian/patched-qemu.Dockerfile @@ -1,7 +1,9 @@ # Build patched QEMU for Debian Buster or Bullseye/Sid inside a container # cd ..; podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/patched-qemu.Dockerfile . +ARG REL= FROM debian:$REL +ARG REL= WORKDIR /root @@ -11,10 +13,6 @@ RUN if [ "$REL" = "buster" ]; then \ echo 'Package: *' >> /etc/apt/preferences; \ echo 'Pin: release a=buster-backports' >> /etc/apt/preferences; \ echo 'Pin-Priority: 500' >> /etc/apt/preferences; \ - echo >> /etc/apt/preferences; \ - echo 'Package: libglvnd* libgles* libglx* libgl1 libegl* libopengl* mesa*' >> /etc/apt/preferences; \ - echo 'Pin: release a=buster-backports' >> /etc/apt/preferences; \ - echo 'Pin-Priority: 50' >> /etc/apt/preferences; \ fi; \ grep '^deb ' /etc/apt/sources.list | perl -pe 's/^deb/deb-src/' >> /etc/apt/sources.list; \ echo 'APT::Install-Recommends false;' >> /etc/apt/apt.conf; \ diff --git a/debian/vitastor.Dockerfile b/debian/vitastor.Dockerfile index c5cb9219..ef64e66e 100644 --- a/debian/vitastor.Dockerfile +++ b/debian/vitastor.Dockerfile @@ -1,7 +1,9 @@ # Build Vitastor packages for Debian Buster or Bullseye/Sid inside a container # cd ..; podman build --build-arg REL=bullseye -v `pwd`/packages:/root/packages -f debian/vitastor.Dockerfile . +ARG REL= FROM debian:$REL +ARG REL= WORKDIR /root