From cd9ba5b8d7b0a8e5de2d3b7b50c92cee27803362 Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Mon, 15 Sep 2025 16:13:05 +0200 Subject: [PATCH 1/7] initial commit Signed-off-by: munishchouhan --- .github/workflows/build-zerofs.yml | 31 ++++++++++++++++++++++++++++++ zerofs/Dockerfile | 20 +++++++++++++++++++ zerofs/Makefile | 9 +++++++++ 3 files changed, 60 insertions(+) create mode 100644 .github/workflows/build-zerofs.yml create mode 100644 zerofs/Dockerfile create mode 100644 zerofs/Makefile diff --git a/.github/workflows/build-zerofs.yml b/.github/workflows/build-zerofs.yml new file mode 100644 index 0000000000..f7681ea83c --- /dev/null +++ b/.github/workflows/build-zerofs.yml @@ -0,0 +1,31 @@ +name: Build and publish ZeroFS container image + +on: + workflow_dispatch: + inputs: + version: + description: 'add the latest version of zerofs https://github.com/Barre/ZeroFS/releases (e.g., 0.15.4)' + required: true + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker Login + uses: docker/login-action@v3 + with: + registry: public.cr.seqera.io + username: ${{ vars.SEQERA_PUBLIC_CR_USERNAME }} + password: ${{ secrets.SEQERA_PUBLIC_CR_PASSWORD }} + + - name: Build and Push Image to public.cr.seqera.io + run: | + cd zerofs + make build version=${{ github.event.inputs.version }} diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile new file mode 100644 index 0000000000..be172abc31 --- /dev/null +++ b/zerofs/Dockerfile @@ -0,0 +1,20 @@ +# Stage 1: Setup +FROM alpine:3.22.1 AS setup + +RUN apk add --no-cache curl tar + +RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz && \ + tar -xzf zerofs-pgo-multiplatform.tar.gz && \ + ls -la zerofs-linux-amd64-pgo && \ + cp zerofs-linux-amd64-pgo /zerofs && \ + chmod +x /zerofs && \ + ls -la /zerofs + +# Stage 2: Runtime +FROM ubuntu:22.04 + +RUN apt-get update && apt-get install -y ca-certificates + +COPY --from=setup /zerofs /shared/zerofs + +CMD ["/bin/sh", "-c", "echo 'Binary info:' && file /shared/zerofs || echo 'file command not available' && ldd /shared/zerofs || echo 'ldd not available' && echo 'Starting ZeroFS...' && exec /shared/zerofs run -c /config/zerofs.toml"] diff --git a/zerofs/Makefile b/zerofs/Makefile new file mode 100644 index 0000000000..ed0cd3011e --- /dev/null +++ b/zerofs/Makefile @@ -0,0 +1,9 @@ +version ?= 0.15.4 + +build: + docker buildx build \ + --push \ + --platform linux/amd64,linux/arm64 \ + --build-arg version=${version} \ + --tag public.cr.seqera.io/wave/zerofs:v${version} \ + . From 6621dff19fc460dc74e43ee2b6b2bb1830247aea Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 16 Sep 2025 17:46:09 +0200 Subject: [PATCH 2/7] update version Signed-off-by: munishchouhan --- .github/workflows/build-zerofs.yml | 7 +++++-- zerofs/Makefile | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-zerofs.yml b/.github/workflows/build-zerofs.yml index f7681ea83c..46a84277ad 100644 --- a/.github/workflows/build-zerofs.yml +++ b/.github/workflows/build-zerofs.yml @@ -4,8 +4,11 @@ on: workflow_dispatch: inputs: version: - description: 'add the latest version of zerofs https://github.com/Barre/ZeroFS/releases (e.g., 0.15.4)' + description: 'Image version (e.g., 0.1.0)' required: true + zfsversion : + description : 'add the latest version of zerofs https://github.com/Barre/ZeroFS/releases (e.g., 0.15.4)' + required : true jobs: build-and-push: @@ -28,4 +31,4 @@ jobs: - name: Build and Push Image to public.cr.seqera.io run: | cd zerofs - make build version=${{ github.event.inputs.version }} + make build version=${{ github.event.inputs.version }} zfs_version=${{ github.event.inputs.zfsversion }} diff --git a/zerofs/Makefile b/zerofs/Makefile index ed0cd3011e..dddb38347a 100644 --- a/zerofs/Makefile +++ b/zerofs/Makefile @@ -1,9 +1,9 @@ -version ?= 0.15.4 - +version ?= 0.1.0 +zfs_version ?= 0.15.4 build: docker buildx build \ --push \ --platform linux/amd64,linux/arm64 \ --build-arg version=${version} \ - --tag public.cr.seqera.io/wave/zerofs:v${version} \ + --tag public.cr.seqera.io/wave/zerofs:v${version}-zfs-${zfs_version} \ . From 03df2c4fcf48c761b4563654de57b536c22c2c25 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Tue, 16 Sep 2025 19:30:59 +0200 Subject: [PATCH 3/7] Simplify zerofs container build Signed-off-by: Paolo Di Tommaso --- zerofs/Dockerfile | 22 +++++----------------- zerofs/Makefile | 3 ++- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile index be172abc31..3d7a37ba49 100644 --- a/zerofs/Dockerfile +++ b/zerofs/Dockerfile @@ -1,20 +1,8 @@ -# Stage 1: Setup -FROM alpine:3.22.1 AS setup - -RUN apk add --no-cache curl tar - -RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz && \ - tar -xzf zerofs-pgo-multiplatform.tar.gz && \ - ls -la zerofs-linux-amd64-pgo && \ - cp zerofs-linux-amd64-pgo /zerofs && \ - chmod +x /zerofs && \ - ls -la /zerofs - -# Stage 2: Runtime FROM ubuntu:22.04 -RUN apt-get update && apt-get install -y ca-certificates - -COPY --from=setup /zerofs /shared/zerofs +RUN apt-get update && apt-get install -y ca-certificates file curl tar +RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz \ + && tar -xzf zerofs-pgo-multiplatform.tar.gz \ + && cp zerofs-linux-amd64-pgo /usr/local/bin/zerofs \ + && chmod +x /usr/local/bin/zerofs -CMD ["/bin/sh", "-c", "echo 'Binary info:' && file /shared/zerofs || echo 'file command not available' && ldd /shared/zerofs || echo 'ldd not available' && echo 'Starting ZeroFS...' && exec /shared/zerofs run -c /config/zerofs.toml"] diff --git a/zerofs/Makefile b/zerofs/Makefile index dddb38347a..05f6449363 100644 --- a/zerofs/Makefile +++ b/zerofs/Makefile @@ -1,9 +1,10 @@ version ?= 0.1.0 zfs_version ?= 0.15.4 + build: docker buildx build \ --push \ --platform linux/amd64,linux/arm64 \ --build-arg version=${version} \ - --tag public.cr.seqera.io/wave/zerofs:v${version}-zfs-${zfs_version} \ + --tag cr.seqera.io/public/zerofs:v${version}-zfs-${zfs_version} \ . From 7adc92d1f906b9cb8b081b3be04779cd9d64afe8 Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 16 Sep 2025 19:49:56 +0200 Subject: [PATCH 4/7] update as per review Signed-off-by: munishchouhan --- zerofs/Dockerfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile index 3d7a37ba49..6d5e0ca883 100644 --- a/zerofs/Dockerfile +++ b/zerofs/Dockerfile @@ -1,7 +1,20 @@ -FROM ubuntu:22.04 +# Stage 1: Setup +FROM alpine:3.22.1 AS setup + +RUN apk add --no-cache curl tar +RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz && \ + tar -xzf zerofs-pgo-multiplatform.tar.gz && \ + ls -la zerofs-linux-amd64-pgo && \ + cp zerofs-linux-amd64-pgo /zerofs && \ + chmod +x /zerofs && \ + ls -la /zerofs + +# Stage 2: Runtime +FROM ubuntu:22.04 +ARG version RUN apt-get update && apt-get install -y ca-certificates file curl tar -RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz \ +RUN curl -LO https://github.com/Barre/ZeroFS/releases/download/v${version}/zerofs-pgo-multiplatform.tar.gz \ && tar -xzf zerofs-pgo-multiplatform.tar.gz \ && cp zerofs-linux-amd64-pgo /usr/local/bin/zerofs \ && chmod +x /usr/local/bin/zerofs From 7557ac7f71b6dde16d5ccf0fc4ca24f34a692cd3 Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 16 Sep 2025 19:54:46 +0200 Subject: [PATCH 5/7] Revert "update as per review" This reverts commit 7adc92d1f906b9cb8b081b3be04779cd9d64afe8. --- zerofs/Dockerfile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile index 6d5e0ca883..3d7a37ba49 100644 --- a/zerofs/Dockerfile +++ b/zerofs/Dockerfile @@ -1,20 +1,7 @@ -# Stage 1: Setup -FROM alpine:3.22.1 AS setup - -RUN apk add --no-cache curl tar - -RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz && \ - tar -xzf zerofs-pgo-multiplatform.tar.gz && \ - ls -la zerofs-linux-amd64-pgo && \ - cp zerofs-linux-amd64-pgo /zerofs && \ - chmod +x /zerofs && \ - ls -la /zerofs - -# Stage 2: Runtime FROM ubuntu:22.04 -ARG version + RUN apt-get update && apt-get install -y ca-certificates file curl tar -RUN curl -LO https://github.com/Barre/ZeroFS/releases/download/v${version}/zerofs-pgo-multiplatform.tar.gz \ +RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz \ && tar -xzf zerofs-pgo-multiplatform.tar.gz \ && cp zerofs-linux-amd64-pgo /usr/local/bin/zerofs \ && chmod +x /usr/local/bin/zerofs From fc7cf9d4ada06bb169288d77fcc1099d6b2e65ed Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 16 Sep 2025 19:56:07 +0200 Subject: [PATCH 6/7] update as per review [ci skip] Signed-off-by: munishchouhan --- zerofs/Dockerfile | 4 ++-- zerofs/Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile index 3d7a37ba49..74af31586d 100644 --- a/zerofs/Dockerfile +++ b/zerofs/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:22.04 - +ARG version RUN apt-get update && apt-get install -y ca-certificates file curl tar -RUN curl -LO https://github.com/Barre/ZeroFS/releases/latest/download/zerofs-pgo-multiplatform.tar.gz \ +RUN curl -LO https://github.com/Barre/ZeroFS/releases/v${version}/download/zerofs-pgo-multiplatform.tar.gz \ && tar -xzf zerofs-pgo-multiplatform.tar.gz \ && cp zerofs-linux-amd64-pgo /usr/local/bin/zerofs \ && chmod +x /usr/local/bin/zerofs diff --git a/zerofs/Makefile b/zerofs/Makefile index 05f6449363..93c594d0d0 100644 --- a/zerofs/Makefile +++ b/zerofs/Makefile @@ -1,10 +1,10 @@ version ?= 0.1.0 -zfs_version ?= 0.15.4 +zfs_version ?= 0.15.5 build: docker buildx build \ --push \ --platform linux/amd64,linux/arm64 \ - --build-arg version=${version} \ + --build-arg version=${zfs_version} \ --tag cr.seqera.io/public/zerofs:v${version}-zfs-${zfs_version} \ . From eaaa8d4f5d07d3dbe2afb9a7cbc30aaf212061bc Mon Sep 17 00:00:00 2001 From: munishchouhan Date: Tue, 16 Sep 2025 19:58:01 +0200 Subject: [PATCH 7/7] fixed zerofs url [ci skip] Signed-off-by: munishchouhan --- zerofs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerofs/Dockerfile b/zerofs/Dockerfile index 74af31586d..611a20b7a5 100644 --- a/zerofs/Dockerfile +++ b/zerofs/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:22.04 ARG version RUN apt-get update && apt-get install -y ca-certificates file curl tar -RUN curl -LO https://github.com/Barre/ZeroFS/releases/v${version}/download/zerofs-pgo-multiplatform.tar.gz \ +RUN curl -LO https://github.com/Barre/ZeroFS/releases/download/v${version}/zerofs-pgo-multiplatform.tar.gz \ && tar -xzf zerofs-pgo-multiplatform.tar.gz \ && cp zerofs-linux-amd64-pgo /usr/local/bin/zerofs \ && chmod +x /usr/local/bin/zerofs