-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (37 loc) · 1.17 KB
/
Dockerfile
File metadata and controls
47 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:24.04 AS builder
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
clang \
curl \
libclang-dev \
&& rm -rf /var/lib/apt/lists/*
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:${PATH}
ENV LIBCLANG_PATH=/usr/lib/llvm-18/lib
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain 1.89.0
COPY .cargo ./.cargo
COPY Cargo.toml Cargo.lock ./
COPY src ./src
COPY artifacts ./artifacts
COPY start.sh ./start.sh
COPY README.md ./README.md
RUN cargo build --release
FROM ubuntu:24.04 AS runtime
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
libgcc-s1 \
libstdc++6 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/Prismguand-Rust /app/Prismguand-Rust
COPY --from=builder /app/artifacts /app/artifacts
COPY --from=builder /app/start.sh /app/start.sh
COPY --from=builder /app/README.md /app/README.md
EXPOSE 8080
ENTRYPOINT ["/app/Prismguand-Rust"]