Fix Dockerfile to build libsignal_ffi dependency

This commit is contained in:
2026-01-15 16:38:25 -06:00
parent be2944dda1
commit 1867086f2b

View File

@@ -1,6 +1,6 @@
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
# Install dependencies
# Install Rust for building libsignal
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
@@ -12,9 +12,17 @@ RUN apt-get update && apt-get install -y \
build-essential \
libolm-dev \
gosu \
cmake \
protobuf-compiler \
clang \
libclang-dev \
&& 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 \
@@ -28,7 +36,9 @@ WORKDIR /app/code
# Download and build mautrix-signal
RUN git clone --branch v0.2512.0 https://github.com/mautrix/signal.git . \
&& go build -o /app/pkg/mautrix-signal ./cmd/mautrix-signal
&& ./build-rust.sh \
&& LIBRARY_PATH=/app/code/pkg/libsignalgo/libsignal/target/release ./build-go.sh \
&& mv mautrix-signal /app/pkg/mautrix-signal
# Copy startup script
COPY start.sh /app/pkg/