guestfs native arm64

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher 2023-05-21 22:32:53 +01:00
parent c2df261e01
commit 81f42a2b3b
3 changed files with 24 additions and 29 deletions

View File

@ -1,4 +1,21 @@
FROM debian:stretch FROM debian:bullseye-slim as base
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -yq upgrade && apt-get install -yq libguestfs-tools syslinux linux-image-amd64 vim
FROM base as syslinux-amd64
# syslinux package is only available on amd64; for arm64, use
# the limited subset of syslinux-common
ENV SYSLINUX="syslinux"
FROM base as syslinux-arm64
ENV SYSLINUX_arm64="syslinux-common"
FROM syslinux-${TARGETARCH} as syslinux
RUN apt-get update && \
apt-get -yq upgrade && \
apt-get install -yq libguestfs-tools \
${SYSLINUX} \
linux-image-${TARGETARCH} \
vim

View File

@ -1,27 +0,0 @@
.PHONY: build push
IMAGE=guestfs
default: push
iid: Dockerfile
tar cf - $^ | docker build --no-cache --iidfile iid -
hash: Makefile iid
docker run --rm $(shell cat iid) sh -c 'apt list --installed 2>/dev/null | sha1sum' | sed 's/ .*//' > hash
push: hash iid
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(shell cat iid) linuxkit/$(IMAGE):$(shell cat hash) && \
docker push linuxkit/$(IMAGE):$(shell cat hash))
rm -f iid
build: hash iid
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(shell cat iid) linuxkit/$(IMAGE):$(shell cat hash)
rm -f iid
clean:
rm -f hash iid
.DELETE_ON_ERROR:

5
tools/guestfs/build.yml Normal file
View File

@ -0,0 +1,5 @@
image: guestfs
network: true
arches:
- arm64
- amd64