-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile.debug
39 lines (25 loc) · 1 KB
/
Dockerfile.debug
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
# Builder image, produces a statically linked binary
FROM golang:1.12.1-alpine3.9 as node-build
RUN apk update && apk add bash make git gcc libstdc++ g++ musl-dev
RUN apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/community \
leveldb-dev
WORKDIR /src
ADD . ./
# RUN go test -mod=vendor -cover ./dkgnode ./logging ./pvss ./common ./tmabci
WORKDIR /src/cmd/dkgnode
RUN go build -mod=vendor
# final image
FROM golang:1.12.1-alpine3.9
RUN apk update && apk add bash make git gcc libstdc++ g++ musl-dev
RUN apk update && apk add ca-certificates --no-cache
RUN apk add --no-cache \
--repository http://nl.alpinelinux.org/alpine/edge/community \
leveldb
# add delve debugger
RUN go get -u github.com/go-delve/delve/cmd/dlv
RUN mkdir -p /torus
COPY --from=node-build /src/cmd/dkgnode/dkgnode /torus/dkgnode
EXPOSE 443 80 1080 26656 26657 18080 40000
VOLUME ["/torus", "/root/https"]
CMD ["dlv", "exec", "/torus/dkgnode", "--listen=:40000", "--headless=true", "--api-version=2", "--log"]