41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
FROM cloudron/base:5.0.0@sha256:04fd70dbd8ad6149c19de39e35718e024417c3e01dc9c6637eaf4a41ec4e596c
|
|
|
|
# Install runtime dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
ca-certificates \
|
|
netcat-openbsd \
|
|
bash \
|
|
jq \
|
|
yq \
|
|
gosu \
|
|
ffmpeg \
|
|
unzip \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Create app directories
|
|
RUN mkdir -p /app/code /app/pkg /app/data
|
|
WORKDIR /app/pkg
|
|
|
|
# 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 and make executable
|
|
COPY start.sh /app/pkg/
|
|
RUN chmod +x /app/pkg/start.sh
|
|
|
|
# Set volumes and environment
|
|
VOLUME /app/data
|
|
ENV UID=1337 GID=1337
|
|
|
|
# Add health check endpoint - check if the appservice port is responding
|
|
HEALTHCHECK --interval=60s --timeout=10s --start-period=30s --retries=3 \
|
|
CMD nc -z localhost 29328 || exit 1
|
|
|
|
CMD ["/app/pkg/start.sh"]
|