forked from zeta-chain/node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-localnet
52 lines (41 loc) · 1.3 KB
/
Dockerfile-localnet
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
FROM golang:1.20-alpine3.18
ENV GOPATH /go
ENV GOOS=linux
ENV CGO_ENABLED=1
RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux python3 py3-pip
RUN pip install requests
RUN ssh-keygen -b 2048 -t rsa -f /root/.ssh/localtest.pem -q -N ""
WORKDIR /go/delivery/zeta-node
COPY go.mod .
COPY go.sum .
#RUN --mount=type=cache,target=/root/.cache/go-build \
# go mod download
RUN go mod download
COPY . .
#RUN --mount=type=cache,target=/root/.cache/go-build \
# make install
#RUN --mount=type=cache,target=/root/.cache/go-build \
# make install-zetae2e
RUN make install
RUN make install-zetae2e
#
#FROM golang:1.20-alpine
#RUN apk --no-cache add openssh jq tmux vim curl bash
RUN ssh-keygen -A
WORKDIR /root
RUN cp /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys
RUN cp /go/bin/zetaclientd /usr/local/bin
RUN cp /go/bin/zetacored /usr/local/bin
RUN cp /go/bin/zetae2e /usr/local/bin
COPY contrib/localnet/scripts /root
COPY contrib/localnet/preparams /root/preparams
COPY contrib/localnet/ssh_config /root/.ssh/config
COPY contrib/localnet/zetacored /root/zetacored
COPY contrib/localnet/tss /root/tss
RUN chmod 755 /root/*.sh
RUN chmod 700 /root/.ssh
RUN chmod 600 /root/.ssh/*
WORKDIR /usr/local/bin
ENV SHELL /bin/sh
EXPOSE 22
ENTRYPOINT ["/usr/sbin/sshd", "-D"]