summaryrefslogtreecommitdiff
path: root/Containerfile
blob: 7e808b223d1adf424070ffde1aae66b440310659 (plain)
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
# A multi-stage container file for the pubd application.

#
# Build stage
#

FROM rust:1.91-slim-bookworm AS builder

RUN apt-get update && apt-get install -y pkg-config protobuf-compiler && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY Cargo.toml Cargo.lock* ./

COPY proto ./proto

COPY build.rs ./

COPY src ./src

RUN cargo build --release

#
# Run stage
#

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y libgcc-s1 && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY --from=builder /app/target/release/pubd /app/pubd

EXPOSE 60069

CMD ["/app/pubd"]