-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
28 lines (22 loc) · 1.2 KB
/
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
FROM docker.io/rust:slim AS builder
RUN apt-get update -y && apt-get install -y musl-tools libssl-dev pkg-config make perl
ENV OPENSSL_LIB_DIR="/usr/lib/x86_64-linux-gnu"
ENV OPENSSL_INCLUDE_DIR="/usr/include/openssl"
COPY . ./findora-scanner
WORKDIR /findora-scanner
RUN cargo build --release
RUN mkdir /findora-scanner-binaries
RUN cp target/$(cat /rust_targets)/release/explorer /findora-scanner-binaries
RUN cp target/$(cat /rust_targets)/release/scanner-cli /findora-scanner-binaries
RUN cp target/$(cat /rust_targets)/release/temp-server /findora-scanner-binaries
RUN cp target/$(cat /rust_targets)/release/prismer /findora-scanner-binaries
RUN strip --strip-all /findora-scanner-binaries/explorer
RUN strip --strip-all /findora-scanner-binaries/scanner-cli
RUN strip --strip-all /findora-scanner-binaries/temp-server
RUN strip --strip-all /findora-scanner-binaries/prismer
FROM debian:stable-slim
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
COPY --from=builder /findora-scanner-binaries/explorer /explorer
COPY --from=builder /findora-scanner-binaries/scanner-cli /scanner-cli
COPY --from=builder /findora-scanner-binaries/temp-server /temp-server
COPY --from=builder /findora-scanner-binaries/prismer /prismer