Hedgedoc : 1.9.7 + passage a buildkit

This commit is contained in:
Gitouche 2023-04-05 22:10:09 +02:00
parent 137e471001
commit 188b3b9af1
2 changed files with 15 additions and 4 deletions

View file

@ -12,9 +12,20 @@ buildfolder=/tmp/hedgedoc-$$
if ! podman image exists ${hedgedoc_image}:${hedgedoc_version}; then
mkdir ${buildfolder} &&
git clone --depth=1 https://github.com/hedgedoc/container ${buildfolder}/ && {
sed_in_place "^FROM node" "FROM docker.io/library/node" ${buildfolder}/alpine/Dockerfile
TMPDIR=${HOME} podman image build -t ${hedgedoc_image}:${hedgedoc_version} --build-arg VERSION=${hedgedoc_version/%-alpine/} -f ${buildfolder}/alpine/Dockerfile ${buildfolder}
}
sed_in_place '^FROM --platform=$BUILDPLATFORM node' 'FROM --platform=$BUILDPLATFORM docker.io/library/node' ${buildfolder}/alpine/Dockerfile
sed_in_place "^FROM node" "FROM docker.io/library/node" ${buildfolder}/alpine/Dockerfile
podman pull docker.io/moby/buildkit:latest
podman run -d --name buildkitd --privileged docker.io/moby/buildkit:latest &&
my_buildctl --addr=podman-container://buildkitd build \
--frontend dockerfile.v0 \
--opt build-arg:VERSION=${hedgedoc_version/%-alpine/} \
--local context=${buildfolder}/ \
--local dockerfile=${buildfolder}/alpine/ \
--output type=oci,name="${hedgedoc_image}:${hedgedoc_version}" | \
podman load &&
podman rm --force buildkitd &&
podman rmi docker.io/moby/buildkit:latest
}
rm -rf ${buildfolder}
podman image prune -a -f --filter dangling=true
podman image prune -a -f --filter intermediate=true

View file

@ -2,7 +2,7 @@
## vars
#hedgedoc_image="quay.io/hedgedoc/hedgedoc"
hedgedoc_image="git.garbaye.fr/garbaye/hedgedoc"
hedgedoc_version='1.9.6-alpine'
hedgedoc_version='1.9.7-alpine'
database_image="docker.io/library/postgres"
database_version='14.5-alpine'
database_path="/var/lib/postgresql/data"