2024-01-05 08:20:56 -08:00
|
|
|
FROM rust:1.75.0 as build
|
2020-07-23 22:46:33 +02:00
|
|
|
ENV PKG_CONFIG_ALLOW_CROSS=1
|
|
|
|
|
|
|
|
|
|
WORKDIR /usr/src/labrinth
|
|
|
|
|
COPY . .
|
2024-01-12 15:00:37 -05:00
|
|
|
ARG SQLX_OFFLINE=true
|
2020-07-23 22:46:33 +02:00
|
|
|
RUN cargo build --release
|
|
|
|
|
|
|
|
|
|
|
2024-01-12 14:19:39 -05:00
|
|
|
FROM debian:bookworm-slim
|
2021-11-14 16:27:33 -07:00
|
|
|
|
|
|
|
|
RUN apt-get update \
|
2021-11-14 17:49:55 -07:00
|
|
|
&& apt-get install -y --no-install-recommends ca-certificates \
|
|
|
|
|
&& apt-get clean \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2021-11-14 16:27:33 -07:00
|
|
|
|
|
|
|
|
RUN update-ca-certificates
|
|
|
|
|
|
2020-08-29 16:56:50 +02:00
|
|
|
COPY --from=build /usr/src/labrinth/target/release/labrinth /labrinth/labrinth
|
2024-01-12 15:00:37 -05:00
|
|
|
COPY --from=build /usr/src/labrinth/migrations/* /labrinth/migrations/
|
|
|
|
|
COPY --from=build /usr/src/labrinth/assets /labrinth/assets
|
|
|
|
|
|
2020-08-28 21:03:00 +02:00
|
|
|
WORKDIR /labrinth
|
2020-08-28 20:24:43 +02:00
|
|
|
|
2024-01-12 14:19:39 -05:00
|
|
|
CMD /labrinth/labrinth
|