storj/cmd/piecestore-farmer/Dockerfile
Alexander Leitner cde0ffaa52 Add dockerfile and yaml for setting up piecestore servers (#102)
* Add dockerfile and yaml for setting up piecestore servers

* Fix dockerfile for @aleitner (#115)

* Fix dockerfile for @aleitner

* Move files for @coyle

* Update yaml

* My linter had some errors so I resolved them

* Make jenkins do the needful

* Make piecestore-farmer look like overlay's build process

* Fix service spec to work in staging

* Make Jenkins push images, but not deploy them, yet.

* Modify entrypoint to fit new verbs

* Update piecestore-farmer entrypoint script to handle new app output
2018-07-19 15:42:50 -04:00

24 lines
751 B
Docker

# 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
RUN cd /go/src/storj.io/storj/cmd/piecestore-farmer && go build -o piecestore-farmer
# final stage
FROM alpine
ENV KAD_HOST=bootstrap.storj.io \
KAD_LISTEN_PORT=7776 \
KAD_PORT=8080 \
PSID= \
PS_DIR=/home/ \
PUBLIC_IP=127.0.0.1 \
RPC_PORT=7777
WORKDIR /app
COPY --from=build-env /go/src/storj.io/storj/cmd/piecestore-farmer/piecestore-farmer /app/
COPY cmd/piecestore-farmer/entrypoint /piecestore-farmer-entrypoint
ENTRYPOINT ["/piecestore-farmer-entrypoint"]