-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (25 loc) · 891 Bytes
/
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
FROM rust:1.83.0-slim-bullseye as builder
ARG is_release=false
RUN apt update -y && \
apt upgrade -y && \
apt install -y protobuf-compiler
RUN apt autoremove
WORKDIR /zilliqa
RUN mkdir build
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/target \
if [ "${is_release}" != "true" ] ; then \
cargo build --bin zilliqa && \
mv ./target/debug/zilliqa ./build/ ;\
else \
cargo build --release --bin zilliqa && \
mv ./target/release/zilliqa ./build/ ;\
fi
FROM ubuntu:22.04
RUN apt update -y && \
apt install -y build-essential libev-dev libgmp-dev
COPY --chmod=777 ./infra/run.sh /run.sh
COPY --from=builder /zilliqa/build/zilliqa /zilliqa
COPY --from=asia-docker.pkg.dev/prj-p-devops-services-tvwmrf63/zilliqa-public/scilla:a5a81f72 /scilla/0 /scilla/0
ENTRYPOINT [ "/run.sh" ]