-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
32 lines (28 loc) · 1003 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
FROM golang:1.22-bullseye AS builder
WORKDIR /ethconnect
RUN apt-get update -y \
&& apt-get install -y build-essential git \
&& curl -Lo /usr/bin/solc https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux \
&& chmod 755 /usr/bin/solc
ADD go.mod go.sum ./
RUN grep -v ethbinding go.mod > go.mod.new \
&& cp go.mod.new go.mod
RUN go get github.com/kaleido-io/ethbinding
RUN go mod download
ADD . .
RUN cp go.mod.new go.mod
RUN make clean deps build
FROM debian:bullseye-slim
WORKDIR /ethconnect
COPY --from=builder /ethconnect/ethconnect .
COPY --from=builder /ethconnect/ethbinding.so .
COPY --from=builder /ethconnect/start.sh .
# get the latest CA certs and symlink the ethconnect binary
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /ethconnect/ethconnect /usr/bin/ethconnect
RUN mkdir abis
USER 1001
ENTRYPOINT [ "./start.sh" ]