-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
27 lines (26 loc) · 1019 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
# build stage
FROM golang:alpine as build-env
RUN apk --no-cache add bash build-base git mercurial gcc musl-dev pkgconfig libsodium-dev
ENV CGO_LDFLAGS="$CGO_LDFLAGS -lstdc++ -lm -lsodium"
ENV CGO_ENABLED=1
ENV GOOS=linux
RUN go get github.com/btcsuite/btcd/blockchain/...
RUN go get github.com/btcsuite/btcd/chaincfg/...
RUN go get github.com/btcsuite/btcd/txscript/...
RUN go get github.com/btcsuite/btcd/wire/...
RUN go get github.com/btcsuite/btcutil/...
RUN go get github.com/gertjaap/verthash-go/...
RUN go get github.com/mattn/go-sqlite3/...
RUN go get github.com/mit-dci/lit/bech32
RUN mkdir -p /go/src/github.com/gertjaap/p2proxy
ADD . /go/src/github.com/gertjaap/p2proxy
WORKDIR /go/src/github.com/gertjaap/p2proxy
RUN go get ./...
RUN go build -o p2proxy
# final stage
FROM alpine
RUN apk --no-cache add ca-certificates
WORKDIR /app
COPY --from=build-env /go/src/github.com/gertjaap/p2proxy/p2proxy /app/
COPY --from=build-env /go/src/github.com/gertjaap/p2proxy/networks /app/networks
ENTRYPOINT ./p2proxy