2018-07-19 20:42:50 +01:00
|
|
|
# build
|
|
|
|
FROM golang:1.10-alpine AS build-env
|
|
|
|
RUN apk add -U curl git musl-dev gcc \
|
|
|
|
&& apk add git
|
|
|
|
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
|
|
|
COPY . /go/src/storj.io/storj
|
|
|
|
RUN cd /go/src/storj.io/storj && dep ensure -vendor-only
|
2018-08-15 19:49:30 +01:00
|
|
|
RUN cd /go/src/storj.io/storj/cmd/farmer && go build -o farmer
|
2018-07-19 20:42:50 +01:00
|
|
|
|
|
|
|
# final stage
|
|
|
|
FROM alpine
|
|
|
|
ENV KAD_HOST=bootstrap.storj.io \
|
|
|
|
KAD_LISTEN_PORT=7776 \
|
|
|
|
KAD_PORT=8080 \
|
|
|
|
PSID= \
|
2018-08-16 19:03:15 +01:00
|
|
|
CONF_PATH= \
|
2018-07-19 20:42:50 +01:00
|
|
|
PS_DIR=/home/ \
|
|
|
|
PUBLIC_IP=127.0.0.1 \
|
|
|
|
RPC_PORT=7777
|
|
|
|
|
|
|
|
WORKDIR /app
|
2018-08-15 19:49:30 +01:00
|
|
|
COPY --from=build-env /go/src/storj.io/storj/cmd/farmer/farmer /app/
|
|
|
|
COPY cmd/farmer/entrypoint /farmer-entrypoint
|
|
|
|
ENTRYPOINT ["/farmer-entrypoint"]
|