-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.dev.buildx
55 lines (36 loc) · 1.36 KB
/
Dockerfile.dev.buildx
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
FROM rust:1.77.2-slim AS builder
ARG VERSION
RUN apt-get update && apt-get install -y \
git \
clang \
libsqlite3-dev \
pkg-config \
libssl-dev \
cmake \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /work
RUN git clone -b ${VERSION} --single-branch --depth 1 https://github.com/Conflux-Chain/conflux-rust.git conflux
WORKDIR /work/conflux
RUN export CC=clang && export CXX=clang++ && cargo build --release
FROM node:22-slim AS node_modules
WORKDIR /root
COPY ./cfxrun/scripts/package.json .
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
build-essential && \
npm install
FROM node:22-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
openssl &&\
rm -rf /var/lib/apt/lists/*
COPY --from=builder /work/conflux/target/release/conflux /bin/conflux
COPY --from=builder /work/conflux/target/release/cfxkey /bin/cfxkey
COPY --from=builder /work/conflux/target/release/pos-genesis-tool /bin/pos-genesis-tool
COPY --from=builder /work/conflux/target/release/cfx-gen-dot /bin/cfx-gen-dot
COPY --from=builder /work/conflux/target/release/cfxstore /bin/cfxstore
WORKDIR /root/run
COPY ./cfxrun .
COPY --from=node_modules /root/node_modules ./scripts/node_modules
RUN chmod +x start.sh conflux.sh gene_account.sh
EXPOSE 12535 12536 12537 12538 12539 32323 32525
ENTRYPOINT [ "./start.sh" ]