1616# Must be run with --privileged flag, recommended to run the container with a
1717# volume mapped in order to easy export images
1818
19- # This Dockerfile is installable on both x86, x86 -64, armhf and arm64 systems
19+ # This Dockerfile is installable on x86-64 (amd64) and aarch64 (amd64) systems
2020ARG ARCH=
2121FROM ${ARCH}debian:bookworm-slim
2222
@@ -27,14 +27,10 @@ RUN grep "VERSION_ID" /etc/os-release || (echo 'VERSION_ID="12"' >> /etc/os-rele
2727
2828# To install using a non-native cpu instructionset use the `--build-arg ARCH=<ARCH>/`
2929# Supported architectures:
30- # arm32v6/
31- # arm32v7/
3230# arm64v8/
33- # Example bo byukd natively:
31+ # Example to build natively:
3432# docker build -t vyos-build:rolling .
35- # Example to build on armhf:
36- # docker build -t vyos-build:rolling-armhf --build-arg ARCH=arm32v7/ .
37- # Example to build on arm64:
33+ # Example to build on arm64/aarch64:
3834# docker build -t vyos-build:rolling-arm64 --build-arg ARCH=arm64v8/ .
3935
4036# On some versions of docker the emulation framework is not installed by default and
@@ -45,7 +41,7 @@ LABEL authors="VyOS Maintainers <maintainers@vyos.io>" \
4541 org.opencontainers.image.url="https://github.com/vyos/vyos-build" \
4642 org.opencontainers.image.documentation="https://docs.vyos.io/en/latest/contributing/build-vyos.html" \
4743 org.opencontainers.image.source="https://github.com/vyos/vyos-build" \
48- org.opencontainers.image.vendor="Sentrium S.L. " \
44+ org.opencontainers.image.vendor="VyOS Networks " \
4945 org.opencontainers.image.licenses="GNU" \
5046 org.opencontainers.image.title="vyos-build" \
5147 org.opencontainers.image.description="Container to build VyOS ISO" \
@@ -134,13 +130,6 @@ RUN apt-get update && apt-get install -y \
134130 libpcre2-dev \
135131 unzip
136132
137- # Update certificate store to not crash ocaml package install
138- # Apply fix for https in curl running on armhf
139- RUN dpkg-reconfigure ca-certificates; \
140- if dpkg-architecture -iarmhf; then \
141- echo "cacert=/etc/ssl/certs/ca-certificates.crt" >> ~/.curlrc; \
142- fi
143-
144133# Installing OCaml needed to compile libvyosconfig
145134RUN curl https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh \
146135 --output /tmp/opam_install.sh --retry 10 --retry-delay 5 && \
@@ -187,7 +176,6 @@ RUN git clone https://salsa.debian.org/live-team/live-build.git /tmp/live-build
187176 dpkg -i ../live-build*.deb && \
188177 rm -rf /tmp/live-build
189178
190- #
191179# live-build: building in docker fails with mounting /proc | /sys
192180#
193181# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919659
@@ -265,29 +253,28 @@ RUN GO_VERSION_INSTALL="1.23.2" ; \
265253 rm /tmp/go*.tar.gz
266254RUN echo "export PATH=/opt/go/bin:$PATH" >> /etc/bash.bashrc
267255
268- # Packages needed for Qemu test-suite
269- # Packages for i386 and amd64 platforms
270- RUN if dpkg-architecture -ii386 || dpkg-architecture -iamd64; then \
271- apt-get update && apt-get install -y \
256+ # Packages needed for QEMU test-suite
257+ RUN apt-get update && apt-get install -y \
272258 python3-pexpect \
273- ovmf \
274- qemu-system-x86 \
275259 qemu-utils \
276- qemu-kvm; \
260+ qemu-kvm
261+
262+ # Packages for amd64 platforms
263+ RUN if dpkg-architecture -iamd64; then \
264+ apt-get update && apt-get install -y \
265+ ovmf \
266+ qemu-system-x86; \
277267 fi
278268
279269# Packages for arm64 platform
280270RUN if dpkg-architecture -iarm64; then \
281271 apt-get update && apt-get install -y \
282- python3-pexpect \
283- ipxe-qemu \
284272 qemu-system-aarch64 \
285273 qemu-efi-aarch64; \
286274 fi
287275
288- # Packages needed for building vmware and GCE images
289- # This is only supported on i386 and amd64 platforms
290- RUN if dpkg-architecture -ii386 || dpkg-architecture -iamd64; then \
276+ # Packages needed for building VMware and GCE images
277+ RUN if dpkg-architecture -iamd64; then \
291278 apt-get update && apt-get install -y \
292279 parted \
293280 udev \
@@ -318,11 +305,6 @@ RUN if dpkg-architecture -iarm64; then \
318305 dosfstools \
319306 u-boot-tools \
320307 grub-efi-$(dpkg-architecture -qDEB_HOST_ARCH); \
321- elif dpkg-architecture -iarmhf; then \
322- apt-get update && apt-get install -y \
323- dosfstools \
324- u-boot-tools \
325- grub-efi-arm; \
326308 fi
327309
328310# Packages needed for OWAMP/TWAMP (service sla)
0 commit comments