Skip to content

Commit cc22a92

Browse files
committed
Update dockerfile
1 parent 39f0408 commit cc22a92

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

apps/labrinth/Dockerfile

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,15 @@
1-
FROM rust:1.75.0 as build
1+
FROM rust:1.79.0 as build
22
ENV PKG_CONFIG_ALLOW_CROSS=1
33

44
WORKDIR /usr/src/labrinth
5-
# Download and compile deps
6-
COPY Cargo.toml .
7-
COPY Cargo.lock .
8-
COPY docker_utils/dummy.rs .
9-
# Change temporarely the path of the code
10-
RUN sed -i 's|src/main.rs|dummy.rs|' Cargo.toml
11-
# Build only deps
12-
RUN cargo build --release --features jemalloc
13-
# Now return the file back to normal
14-
RUN sed -i 's|dummy.rs|src/main.rs|' Cargo.toml
15-
16-
# Copy everything
175
COPY . .
18-
# Build our code
19-
ARG SQLX_OFFLINE=true
20-
RUN cargo build --release --features jemalloc
6+
RUN cargo build --release
7+
218

22-
# Final Stage
23-
FROM ubuntu:latest
9+
FROM debian:bookworm-slim
2410

2511
RUN apt-get update \
26-
&& apt-get install -y --no-install-recommends ca-certificates \
12+
&& apt-get install -y --no-install-recommends ca-certificates openssl \
2713
&& apt-get clean \
2814
&& rm -rf /var/lib/apt/lists/*
2915

0 commit comments

Comments
 (0)