-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile.dev.hawk
More file actions
61 lines (49 loc) · 2.85 KB
/
Dockerfile.dev.hawk
File metadata and controls
61 lines (49 loc) · 2.85 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM public.ecr.aws/ubuntu/ubuntu:22.04 AS build-image
WORKDIR /src
RUN apt-get update && apt-get install -y \
curl \
build-essential \
libssl-dev \
texinfo \
libcap2-bin \
pkg-config \
git \
devscripts \
debhelper \
ca-certificates \
protobuf-compiler \
wget
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
ENV RUSTUP_HOME="/root/.rustup"
ENV CARGO_HOME="/root/.cargo"
RUN rustup toolchain install 1.89.0
RUN rustup default 1.89.0
RUN rustup component add cargo
RUN cargo install cargo-build-deps \
&& cargo install cargo-edit --version 0.13.6 --locked
FROM build-image AS build-app
WORKDIR /src/iris-mpc
COPY . .
RUN cargo build -p iris-mpc-bins --release --bin iris-mpc-hawk --bin iris-mpc-hawk-genesis --bin key-manager --bin client
FROM public.ecr.aws/ubuntu/ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y ca-certificates awscli curl
RUN curl -o /usr/local/share/ca-certificates/ca_party_dev_0.crt https://wf-ampc-hnsw-ca-dev-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_dev_0.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_dev_1.crt https://wf-ampc-hnsw-ca-dev-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_dev_1.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_dev_2.crt https://wf-ampc-hnsw-ca-dev-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_dev_2.pem
RUN curl -o /usr/local/share/ca-certificates/ca_party_stage_0.crt https://wf-ampc-hnsw-ca-stage-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_stage_0.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_stage_1.crt https://wf-ampc-hnsw-ca-stage-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_stage_1.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_stage_2.crt https://wf-ampc-hnsw-ca-stage-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_stage_2.pem
RUN curl -o /usr/local/share/ca-certificates/ca_party_prod_0.crt https://wf-ampc-hnsw-ca-prod-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_prod_0.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_prod_1.crt https://wf-ampc-hnsw-ca-prod-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_prod_1.pem && \
curl -o /usr/local/share/ca-certificates/ca_party_prod_2.crt https://wf-ampc-hnsw-ca-prod-eu-central-1.s3.eu-central-1.amazonaws.com/ca_party_prod_2.pem
COPY certs /usr/local/share/ca-certificates/
RUN update-ca-certificates
COPY --from=build-app /src/iris-mpc/target/release/iris-mpc-hawk /bin/iris-mpc-hawk
COPY --from=build-app /src/iris-mpc/target/release/key-manager /bin/key-manager
COPY --from=build-app /src/iris-mpc/target/release/client /bin/client
COPY --from=build-app /src/iris-mpc/target/release/iris-mpc-hawk-genesis /bin/iris-mpc-hawk-genesis
COPY scripts/run-server-docker.sh .
COPY scripts/run-client-docker.sh .
USER 65534