From e922f7642484aea8e6dfc074253aafc022b39bf7 Mon Sep 17 00:00:00 2001 From: Andreas Dueren Date: Thu, 15 Jan 2026 16:50:41 -0600 Subject: [PATCH] Use prebuilt binary instead of compiling from source --- Dockerfile.cloudron | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/Dockerfile.cloudron b/Dockerfile.cloudron index 3a561d5..e32bc67 100644 --- a/Dockerfile.cloudron +++ b/Dockerfile.cloudron @@ -1,6 +1,6 @@ FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c -# Install Rust for building libsignal +# Install runtime dependencies RUN apt-get update && apt-get install -y \ curl \ ca-certificates \ @@ -8,37 +8,22 @@ RUN apt-get update && apt-get install -y \ bash \ jq \ yq \ - git \ - build-essential \ - libolm-dev \ gosu \ - cmake \ - protobuf-compiler \ - clang \ - libclang-dev \ + ffmpeg \ + unzip \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Install Rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -ENV PATH="/root/.cargo/bin:$PATH" - -# Install Go -ENV GO_VERSION=1.24.0 -RUN curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz \ - && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \ - && rm go${GO_VERSION}.linux-amd64.tar.gz -ENV PATH="/usr/local/go/bin:$PATH" - # Create app directories RUN mkdir -p /app/code /app/pkg /app/data -WORKDIR /app/code +WORKDIR /app/pkg -# Download and build mautrix-signal -RUN git clone --branch v0.2512.0 https://github.com/mautrix/signal.git . \ - && ./build-rust.sh \ - && LIBRARY_PATH=/app/code/pkg/libsignalgo/libsignal/target/release ./build-go.sh \ - && mv mautrix-signal /app/pkg/mautrix-signal +# Download prebuilt mautrix-signal binary from CI +# Using the amd64 build artifact +RUN curl -L "https://mau.dev/mautrix/signal/-/jobs/artifacts/main/download?job=build%20amd64" -o /tmp/mautrix-signal.zip \ + && unzip /tmp/mautrix-signal.zip -d /app/pkg/ \ + && chmod +x /app/pkg/mautrix-signal \ + && rm /tmp/mautrix-signal.zip # Copy startup script COPY start.sh /app/pkg/