-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (24 loc) · 878 Bytes
/
Dockerfile
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
FROM rust:1.81.0-slim-bullseye as builder
WORKDIR /usr/src/pandas-pouch
RUN apt-get update && \
apt-get install -y \
libssl-dev \
pkg-config \
protobuf-compiler && \
rm -rf /var/lib/apt/lists/*
COPY Cargo.toml Cargo.lock ./
COPY src ./src
COPY proto ./proto
COPY config ./config
COPY build.rs .
RUN cargo build --release
FROM debian:bullseye-slim
WORKDIR /usr/local/bin
RUN apt-get update && \
apt-get install -y ca-certificates postgresql-client && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/src/pandas-pouch/target/release/pandas-pouch /usr/local/bin/pandas-pouch
COPY --from=builder /usr/src/pandas-pouch/config /usr/local/bin/config
COPY wait-for-it.sh /usr/local/bin/wait-for-it.sh
RUN chmod +x /usr/local/bin/wait-for-it.sh
CMD ["/usr/local/bin/wait-for-it.sh", "db", "5432", "pandas-pouch"]