forked from facebookresearch/Private-ID
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (30 loc) · 1.08 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
29
30
31
32
33
34
35
36
37
FROM rust:latest AS build
LABEL maintainer="Vlad Vlaskin <[email protected]>"
ENV BASE /usr/local
RUN rustup install nightly && \
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
ADD . /opt/private-id
WORKDIR /opt/private-id
RUN cargo +nightly build \
--release \
--workspace \
--target-dir /opt/private-id/bin
#cleanup everything except binaries
RUN mkdir -p /opt/private-id/exec && \
cp bin/release/private-id-server exec && \
cp bin/release/private-id-client exec && \
cp bin/release/cross-psi-server exec && \
cp bin/release/cross-psi-client exec && \
cp bin/release/cross-psi-xor-server exec && \
cp bin/release/cross-psi-xor-client exec && \
cp bin/release/pjc-client exec && \
cp bin/release/pjc-server exec && \
cp bin/release/datagen exec
# thin container with binaries
# base image is taken from here https://hub.docker.com/_/debian/
FROM debian:stable-slim AS privateid
RUN apt-get update && \
apt-get install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /opt/private-id/exec /opt/private-id/bin
WORKDIR /opt/private-id