@@ -6,17 +6,16 @@ WORKDIR /usr/src/labrinth
6
6
COPY . .
7
7
ARG GIT_HASH
8
8
RUN --mount=type=cache,target=/usr/src/labrinth/target \
9
- --mount=type=cache,target=/usr/local/cargo/git/db \
10
- --mount=type=cache,target=/usr/local/cargo/registry \
11
- SQLX_OFFLINE=true cargo build --profile release-labrinth --package labrinth
9
+ --mount=type=cache,target=/usr/local/cargo,from=rust:1.89.0,source=/usr/local/cargo \
10
+ SQLX_OFFLINE=true cargo build --profile release-labrinth --package labrinth
12
11
13
12
FROM build AS artifacts
14
13
15
14
RUN --mount=type=cache,target=/usr/src/labrinth/target \
16
- mkdir /labrinth \
17
- && cp /usr/src/labrinth/target/release-labrinth/labrinth /labrinth/labrinth \
18
- && cp -r /usr/src/labrinth/apps/labrinth/migrations /labrinth \
19
- && cp -r /usr/src/labrinth/apps/labrinth/assets /labrinth
15
+ mkdir /labrinth \
16
+ && cp /usr/src/labrinth/target/release-labrinth/labrinth /labrinth/labrinth \
17
+ && cp -r /usr/src/labrinth/apps/labrinth/migrations /labrinth \
18
+ && cp -r /usr/src/labrinth/apps/labrinth/assets /labrinth
20
19
21
20
FROM debian:bookworm-slim
22
21
@@ -26,8 +25,8 @@ LABEL org.opencontainers.image.description="Modrinth API"
26
25
LABEL org.opencontainers.image.licenses=AGPL-3.0-only
27
26
28
27
RUN apt-get update \
29
- && apt-get install -y --no-install-recommends ca-certificates dumb-init curl \
30
- && rm -rf /var/lib/apt/lists/*
28
+ && apt-get install -y --no-install-recommends ca-certificates dumb-init curl \
29
+ && rm -rf /var/lib/apt/lists/*
31
30
32
31
COPY --from=artifacts /labrinth /labrinth
33
32
0 commit comments