matrix/synapse: fix buildkitd options. Fixes #16

This commit is contained in:
Gitouche 2023-07-26 23:05:49 +02:00
parent 3b69668207
commit 7f48f4b300

View file

@ -9,13 +9,15 @@ ensure_not_root
buildfolder=/tmp/synapse-$$ buildfolder=/tmp/synapse-$$
buildkitd_version='v0.11.6' # latest v0.12.0 is broken buildkitd_version='latest'
buildkitd_args='--oci-worker-snapshotter=native' # needed as of v0.12.0
if ! podman image exists ${synapse_image}:${synapse_version}; then if ! podman image exists ${synapse_image}:${synapse_version}; then
mkdir ${buildfolder} && mkdir ${buildfolder} &&
curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ && { curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ && {
podman image pull docker.io/moby/buildkit:${buildkitd_version} podman image pull docker.io/moby/buildkit:${buildkitd_version}
podman container run -d --name buildkitd --privileged docker.io/moby/buildkit:${buildkitd_version} && podman container run -d --name buildkitd --privileged docker.io/moby/buildkit:${buildkitd_version} ${buildkitd_args} &&
sleep 3
my_buildctl --addr=podman-container://buildkitd build \ my_buildctl --addr=podman-container://buildkitd build \
--frontend dockerfile.v0 \ --frontend dockerfile.v0 \
--local context=${buildfolder}/ \ --local context=${buildfolder}/ \