-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (24 loc) · 1.33 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
38
39
40
41
FROM golang:1.20.7 AS builder
WORKDIR /multiversx
COPY . .
RUN go mod tidy
WORKDIR /multiversx/cmd/chainsimulator
RUN go build -o chainsimulator
RUN mkdir -p /lib_amd64 /lib_arm64
RUN cp /go/pkg/mod/github.com/multiversx/$(cat /multiversx/go.sum | grep mx-chain-vm-v | sort -n | tail -n -1 | awk -F '/' '{print$3}' | sed 's/ /@/g')/wasmer/libwasmer_linux_amd64.so /lib_amd64/
RUN cp /go/pkg/mod/github.com/multiversx/$(cat /multiversx/go.sum | grep mx-chain-vm-go | sort -n | tail -n -1 | awk -F '/' '{print$3}' | sed 's/ /@/g')/wasmer2/libvmexeccapi.so /lib_amd64/
RUN cp /go/pkg/mod/github.com/multiversx/$(cat /multiversx/go.sum | grep mx-chain-vm-v | sort -n | tail -n -1 | awk -F '/' '{print$3}' | sed 's/ /@/g')/wasmer/libwasmer_linux_arm64_shim.so /lib_arm64/
RUN cp /go/pkg/mod/github.com/multiversx/$(cat /multiversx/go.sum | grep mx-chain-vm-go | sort -n | tail -n -1 | awk -F '/' '{print$3}' | sed 's/ /@/g')/wasmer2/libvmexeccapi_arm.so /lib_arm64/
FROM ubuntu:22.04
ARG TARGETARCH
RUN apt-get update \
&& apt-get -y install git \
&& apt-get clean
COPY --from=builder /multiversx/cmd/chainsimulator /multiversx
EXPOSE 8085
WORKDIR /multiversx
# Copy architecture-specific files
COPY --from=builder "/lib_${TARGETARCH}/*" "/lib/"
RUN apt-get update && apt-get install -y curl
CMD ["/bin/bash"]
ENTRYPOINT ["./chainsimulator"]