2024-10-16 16:12:23 -07:00
|
|
|
FROM rust:1.81.0 as build
|
2020-07-23 22:46:33 +02:00
|
|
|
ENV PKG_CONFIG_ALLOW_CROSS=1
|
|
|
|
|
|
|
|
|
|
WORKDIR /usr/src/labrinth
|
|
|
|
|
COPY . .
|
2024-10-16 16:07:24 -07:00
|
|
|
RUN cargo build --release
|
|
|
|
|
|
2020-07-23 22:46:33 +02:00
|
|
|
|
2024-11-11 18:31:06 -08:00
|
|
|
FROM debian:bookworm-slim
|
2021-11-14 16:27:33 -07:00
|
|
|
|
2024-10-18 17:00:36 -07:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/modrinth/code
|
|
|
|
|
LABEL org.opencontainers.image.description="Modrinth API"
|
|
|
|
|
LABEL org.opencontainers.image.licenses=AGPL-3.0
|
|
|
|
|
|
2021-11-14 16:27:33 -07:00
|
|
|
RUN apt-get update \
|
2024-10-16 16:07:24 -07:00
|
|
|
&& apt-get install -y --no-install-recommends ca-certificates openssl \
|
2021-11-14 17:49:55 -07:00
|
|
|
&& 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
|