-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathDockerfile.arm64.hawk
More file actions
67 lines (52 loc) · 2.86 KB
/
Dockerfile.arm64.hawk
File metadata and controls
67 lines (52 loc) · 2.86 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
62
63
64
65
66
67
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-edit --version 0.13.6 --locked
FROM build-image AS build-app
WORKDIR /src/iris-mpc
COPY . .
ENV RUSTFLAGS="-C force-frame-pointers=yes -Ctarget-cpu=neoverse-v2 -Ctarget-feature=+lse"
RUN cargo build -p iris-mpc-bins --release --target=aarch64-unknown-linux-gnu --bin iris-mpc-hawk
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
ARG ARCHITECTURE
ENV ARCHITECTURE=$ARCHITECTURE
RUN apt-get update && apt-get install -y ca-certificates curl unzip
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$ARCHITECTURE.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
aws --version
RUN apt-get update && apt-get install -y ca-certificates 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/aarch64-unknown-linux-gnu/release/iris-mpc-hawk /bin/iris-mpc-hawk
USER 65534
ENTRYPOINT ["/bin/iris-mpc-hawk"]