From cc9a706181f535654d640816e31c4c064255eada Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sat, 5 Mar 2022 09:40:20 +0100 Subject: [PATCH] Matrix : improve readibility --- podman-matrix/zz_build-images.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/podman-matrix/zz_build-images.sh b/podman-matrix/zz_build-images.sh index f01b214..f671805 100755 --- a/podman-matrix/zz_build-images.sh +++ b/podman-matrix/zz_build-images.sh @@ -9,10 +9,19 @@ ensure_not_root if ! podman image exists localhost/matrixdotorg/synapse:${synapse_version}; then mkdir synapse && - curl -s -- "https://codeload.github.com/matrix-org/synapse/tar.gz/refs/tags/${synapse_version}" | tar xz --strip-components 1 -C synapse/ && { + curl -s -- "https://codeload.github.com/matrix-org/synapse/tar.gz/refs/tags/${synapse_version}" | \tar xz --strip-components 1 -C synapse/ && { podman run -d --name buildkitd --privileged docker.io/moby/buildkit:latest && - curl -sSLf https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | tar xz -C ~/ bin/buildctl && - ~/bin/buildctl --addr=podman-container://buildkitd build --frontend dockerfile.v0 --local context=synapse/ --local dockerfile=synapse/docker/ --output type=tar | podman import --change 'EXPOSE 8008/tcp' --change 'EXPOSE 8009/tcp' --change 'EXPOSE 8448/tcp' --change 'ENTRYPOINT ["/start.py"]' - localhost/matrixdotorg/synapse:${synapse_version} + curl -sSLf https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | \ + tar xz -C ~/ bin/buildctl && + ~/bin/buildctl --addr=podman-container://buildkitd build \ + --frontend dockerfile.v0 \ + --local context=synapse/ \ + --local dockerfile=synapse/docker/ \ + --output type=tar | \ + podman import --change 'EXPOSE 8008/tcp' \ + --change 'EXPOSE 8009/tcp' \ + --change 'EXPOSE 8448/tcp' \ + --change 'ENTRYPOINT ["/start.py"]' - localhost/matrixdotorg/synapse:${synapse_version} && podman rm --force buildkitd && podman rmi docker.io/moby/buildkit:latest && rm -f ~/bin/buildctl