From 7a8f800f0558c2d856ddf685440db3300588dc16 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 17 May 2025 21:23:19 +0200 Subject: [PATCH] wip --- .forgejo/workflows/build.yaml | 2 +- builder.sh | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index d82c609..a988c3e 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,7 +1,7 @@ on: [push] env: REGISTRY: forge.hornwitser.no - REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder:${{ github.ref_name }} + REGISTRY_IMAGE: forge.hornwitser.no/hornwitser/builder:${{ github.ref_name }} jobs: build: diff --git a/builder.sh b/builder.sh index dee69ef..1d98ced 100755 --- a/builder.sh +++ b/builder.sh @@ -7,31 +7,39 @@ PNPM_VERSION=v9.5.0 NODE_VERSION=22.x ctr=$(buildah from "docker.io/library/debian:trixie-20250428") -#mnt=$(buildah mount $ctr) +mnt=$(buildah mount $ctr) -buildah run $ctr -- apt-get install -y --no-install-recommends \ +buildah run -- $ctr apt-get install -y --no-install-recommends \ buildah \ + ca-certificates \ + containers-storage \ curl \ + fuse-overlayfs \ git \ + netavark \ openssh-client \ ; - #ca-certificates \ #gpg \ +sed $mnt/usr/share/containers/storage.conf \ + -e '/^#\?mount_program/c\ +mount_program = "/usr/bin/fuse-overlayfs"' \ +> $mnt/etc/containers/storage.conf + # yq https://github.com/mikefarah/yq?tab=readme-ov-file#install -buildah run $ctr -- sh -c 'curl --silent --location "https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/yq_linux_amd64.tar.gz" \ +buildah run -- $ctr sh -c 'curl --silent --location "https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/yq_linux_amd64.tar.gz" \ | tar --extract --gzip --to-stdout ./yq_linux_amd64 \ | install --owner=root --group=root --mode=0755 /dev/stdin $mnt/usr/local/bin/yq \ ;' # node https://github.com/nodesource/distributions?tab=readme-ov-file#using-debian-as-root-nodejs-22 -buildah run $ctr -- sh -c 'curl --silent --location "https://deb.nodesource.com/setup_$NODE_VERSION" | bash' -buildah run $ctr -- apt-get install -y --no-install-recommends nodejs +buildah run -- $ctr sh -c 'curl --silent --location "https://deb.nodesource.com/setup_$NODE_VERSION" | bash' +buildah run -- $ctr apt-get install -y --no-install-recommends nodejs # pnpm https://nodejs.org/api/corepack.html#upgrading-the-global-versions -buildah run $ctr -- corepack install --global pnpm@$PNPM_VERSION -buildah run $ctr -- corepack enable pnpm +buildah run -- $ctr corepack install --global pnpm@$PNPM_VERSION +buildah run -- $ctr corepack enable pnpm # Clear caches -buildah run $ctr rm -rf /var/lib/apt/lists/* +buildah run -- $ctr rm -rf /var/lib/apt/lists/* buildah commit --rm $ctr $1