Build on host

This commit is contained in:
Mo 2022-10-23 18:09:22 +02:00
parent 7b890f72a9
commit 44de293650

View file

@ -8,7 +8,7 @@ buildah rm builder &>/dev/null
buildah from --pull --name builder registry.fedoraproject.org/fedora:latest
buildah run builder -- dnf upgrade -y
buildah run builder -- dnf install -y cargo git-lfs sqlite-devel npm
buildah run builder -- dnf install -y git-lfs sqlite-devel npm
buildah run builder -- dnf autoremove -y
buildah run builder -- dnf clean all
@ -18,8 +18,12 @@ buildah run builder -- tar -xzvf zola.tar.gz
buildah run builder -- rm zola.tar.gz
buildah run builder -- mv zola /usr/local/bin
buildah config --workingdir /volumes/src -e DATABASE_URL=/volumes/db/db.sqlite builder
buildah config --cmd 'cargo run -r' builder
buildah config \
--workingdir /volumes/src \
-e DATABASE_URL=/volumes/db/db.sqlite \
-e GWC_CONFIG_FILE=/volumes/src/config.json \
--cmd /volumes/src/target/release/git-webhook-client \
builder
if systemctl --user is-enabled container-$container_name
systemctl --user disable --now container-$container_name
@ -31,6 +35,10 @@ end
buildah commit --rm builder $container_name
cd $repo_dir
cargo update
cargo build -r
podman-default-create \
$container_name \
--network traefik \