mirror of
https://github.com/fluxerapp/fluxer.git
synced 2026-12-06 00:52:56 -08:00
42 lines
1.3 KiB
Docker
42 lines
1.3 KiB
Docker
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
FROM rust:1.98.1-trixie@sha256:a8a5f0a1e5fe7dfe1d352591e4a1c7dd2c08fd70475cae872cf3458ba0df0546 AS builder
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build --release -p fluxer-users --features scylla
|
|
|
|
FROM debian:trixie-slim
|
|
|
|
ARG BUILD_VERSION=""
|
|
ARG SOURCE_SHA=""
|
|
ARG SOURCE_DATE=""
|
|
|
|
LABEL org.opencontainers.image.title="fluxer-users"
|
|
LABEL org.opencontainers.image.description="Fluxer user storage service"
|
|
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later"
|
|
LABEL org.opencontainers.image.vendor="Fluxer"
|
|
LABEL org.opencontainers.image.url="https://fluxer.com"
|
|
LABEL org.opencontainers.image.documentation="https://docs.fluxer.com"
|
|
LABEL org.opencontainers.image.source="https://github.com/fluxerapp/fluxer"
|
|
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
|
|
LABEL org.opencontainers.image.revision="${SOURCE_SHA}"
|
|
LABEL org.opencontainers.image.created="${SOURCE_DATE}"
|
|
LABEL app.fluxer.build-version="${BUILD_VERSION}"
|
|
|
|
WORKDIR /usr/local/bin
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
COPY --from=builder /usr/src/app/target/release/fluxer-users /usr/local/bin/fluxer-users
|
|
|
|
ENV BUILD_VERSION="${BUILD_VERSION}"
|
|
|
|
USER 65532:65532
|
|
|
|
EXPOSE 8090
|
|
|
|
CMD ["/usr/local/bin/fluxer-users"]
|