-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
### Build stage | ||
FROM golang:alpine AS build-env | ||
FROM golang:alpine3.9 AS build-env | ||
ENV VERSION v2.0 | ||
# Install build deps | ||
RUN apk update && apk --no-cache add git gcc build-base | ||
# Get the source code | ||
RUN git clone https://github.com/vipnode/vipnode.git | ||
RUN git clone -b ${VERSION} https://github.com/vipnode/vipnode.git | ||
|
||
WORKDIR /go/vipnode | ||
RUN go get -d -v | ||
RUN go mod download | ||
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o vipnode | ||
|
||
### Final stage | ||
FROM alpine | ||
FROM alpine:3.9 | ||
RUN apk update && apk --no-cache add ca-certificates | ||
WORKDIR /app | ||
COPY --from=build-env /go/vipnode/vipnode /app/ | ||
ENTRYPOINT ./vipnode host --rpc=http://my.ethchain.dnp.dappnode.eth:8545 -vv --payout=${PAYOUT_ADDRESS} --nodekey=/app/.ethchain/network/key | ||
COPY --from=build-env /go/vipnode/vipnode /usr/bin/ | ||
ENTRYPOINT vipnode host --rpc=http://my.ethchain.dnp.dappnode.eth:8545 -vv --payout=${PAYOUT_ADDRESS} --nodekey=/app/.ethchain/network/key |