Use prebuilt binary instead of compiling from source
This commit is contained in:
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user