Skip to content

Commit

Permalink
polishing of Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
eduadiez committed Apr 9, 2019
1 parent 457bcd6 commit 4790d54
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build/Dockerfile
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

0 comments on commit 4790d54

Please sign in to comment.