Files
stoatchat/Dockerfile
izzy fe348db834 feat: opentelemetry crate and files/autumn integration (#499)
Signed-off-by: izzy <me@insrt.uk>
GitHub-Pull-Request: https://github.com/stoatchat/stoatchat/pull/499
Change-Id: If576743ccf6c7bea288a4ebb3fc485708cd21b51
Reviewed-on: https://gerrit.stoatinternal.com/c/stoatchat/+/201
Tested-by: Stoat Code Review <code-review@stoat.chat>
Reviewed-by: insert <insert@stoat.chat>
2026-10-13 18:22:38 +00:00

48 lines
1.8 KiB
Docker

# Build Stage
FROM --platform="${BUILDPLATFORM}" rust:1.92.0-slim-trixie
USER 0:0
WORKDIR /home/rust/src
ARG TARGETARCH
ARG CARGO_BUILD_JOBS=10
ENV CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS}
# Install build requirements
RUN dpkg --add-architecture "${TARGETARCH}"
RUN apt-get update && \
apt-get install -y \
make \
pkg-config \
libdav1d-dev:"${TARGETARCH}" \
libssl-dev:"${TARGETARCH}"
COPY scripts/build-image-layer.sh /tmp/
RUN sh /tmp/build-image-layer.sh tools
# Build all dependencies
COPY Cargo.toml Cargo.lock ./
COPY crates/bonfire/Cargo.toml ./crates/bonfire/
COPY crates/delta/Cargo.toml ./crates/delta/
COPY crates/core/config/Cargo.toml ./crates/core/config/
COPY crates/core/database/Cargo.toml ./crates/core/database/
COPY crates/core/files/Cargo.toml ./crates/core/files/
COPY crates/core/models/Cargo.toml ./crates/core/models/
COPY crates/core/parser/Cargo.toml ./crates/core/parser/
COPY crates/core/permissions/Cargo.toml ./crates/core/permissions/
COPY crates/core/presence/Cargo.toml ./crates/core/presence/
COPY crates/core/result/Cargo.toml ./crates/core/result/
COPY crates/core/coalesced/Cargo.toml ./crates/core/coalesced/
COPY crates/core/ratelimits/Cargo.toml ./crates/core/ratelimits/
COPY crates/common/otel/Cargo.toml ./crates/common/otel/
COPY crates/services/autumn/Cargo.toml ./crates/services/autumn/
COPY crates/services/january/Cargo.toml ./crates/services/january/
COPY crates/services/gifbox/Cargo.toml ./crates/services/gifbox/
COPY crates/daemons/crond/Cargo.toml ./crates/daemons/crond/
COPY crates/daemons/pushd/Cargo.toml ./crates/daemons/pushd/
COPY crates/daemons/voice-ingress/Cargo.toml ./crates/daemons/voice-ingress/
RUN sh /tmp/build-image-layer.sh deps
# Build all apps
COPY crates ./crates
RUN sh /tmp/build-image-layer.sh apps