Matrix image build : arm64 compatibility
This commit is contained in:
parent
ab3bb7bb27
commit
a04aefcac2
|
@ -9,11 +9,20 @@ ensure_not_root
|
||||||
|
|
||||||
buildfolder=/tmp/synapse-$$
|
buildfolder=/tmp/synapse-$$
|
||||||
|
|
||||||
|
if [[ $(uname -i) == 'aarch64' ]]; then
|
||||||
|
buildkitarch='arm64'
|
||||||
|
elif [[ $(uname -i) == 'x86_64' ]]; then
|
||||||
|
buildkitarch='amd64'
|
||||||
|
else
|
||||||
|
# defaults to amd64
|
||||||
|
buildkitarch='amd64'
|
||||||
|
fi
|
||||||
|
|
||||||
if ! podman image exists localhost/matrixdotorg/synapse:${synapse_version}; then
|
if ! podman image exists localhost/matrixdotorg/synapse:${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 run -d --name buildkitd --privileged docker.io/moby/buildkit:latest &&
|
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 | \
|
curl -sSLf https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-${buildkitarch}.tar.gz | \
|
||||||
tar xz -C ~/ bin/buildctl &&
|
tar xz -C ~/ bin/buildctl &&
|
||||||
~/bin/buildctl --addr=podman-container://buildkitd build \
|
~/bin/buildctl --addr=podman-container://buildkitd build \
|
||||||
--frontend dockerfile.v0 \
|
--frontend dockerfile.v0 \
|
||||||
|
|
Loading…
Reference in a new issue