From 6d0a9c94907545620a1a6a861b694823ba448b61 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sat, 22 Feb 2025 22:43:27 +0100 Subject: [PATCH] build virtiofsd from source --- .github/workflows/publish.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8e94d2d4..a066695f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,9 +26,15 @@ jobs: - name: Create dockerfile for Ubuntu run: | cat << END > Dockerfile + FROM rust:bookworm as builder + RUN apt update + RUN apt install -y --no-install-recommends libcap-ng-dev libseccomp-dev clang-dev + RUN cargo install --tag v1.13.1 --git https://gitlab.com/virtio-fs/virtiofsd.git FROM ubuntu:latest RUN apt update - RUN apt install -y --no-install-recommends libcap-ng0 libseccomp2 qemu-system-x86 net-tools virtiofsd + RUN apt install -y --no-install-recommends libcap-ng0 libseccomp2 qemu-system-x86 net-tools + COPY --from=builder /usr/local/cargo/bin/virtiofsd /usr/bin/virtiofsd + RUN chmod 0755 /usr/bin/virtiofsd END - name: Build and push container uses: docker/build-push-action@v6 @@ -39,8 +45,13 @@ jobs: - name: Create dockerfile for Alpine run: | cat << END > Dockerfile + FROM alpine:latest as builder + RUN apk add --no-cache rust cargo libseccomp-dev libcap-ng-dev + RUN cargo install --tag v1.13.1 --git https://gitlab.com/virtio-fs/virtiofsd.git FROM alpine:latest - RUN apk add --no-cache qemu qemu-system-x86_64 libseccomp libcap-ng virtiofsd + RUN apk add --no-cache qemu qemu-system-x86_64 libseccomp libcap-ng + COPY --from=builder /root/.cargo/bin/virtiofsd /usr/bin/virtiofsd + RUN chmod 0755 /usr/bin/virtiofsd END - name: Build and push container uses: docker/build-push-action@v6