forked from terra-sync/cnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 775 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 775 Bytes
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
FROM debian:latest as builder
# Install build dependencies
RUN apt-get update && apt-get install -y \
gcc make \
libcurl4-openssl-dev libpq-dev libinih-dev automake \
autoconf git libc6-dev curl pkg-config libssl-dev
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
# Add Rust to the PATH
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY . .
RUN chmod +x scripts/build-rust-libs.sh
RUN ./autogen.sh && ./configure
RUN make
FROM debian:latest
# Install runtime libraries
RUN apt-get update && apt-get install -y \
libpq5 libcurl4 libinih-dev
COPY --from=builder /app/cnc /cnc
COPY --from=builder /app/rust/email/target/debug/libemail.so rust/email/target/debug/libemail.so
# Set the binary as the entrypoint of the container
ENTRYPOINT ["/cnc"]