2018-08-22 03:54:56 +01:00
|
|
|
ARG GO_VERSION=1.10
|
|
|
|
FROM golang:${GO_VERSION}-alpine AS build-env
|
2018-07-02 20:18:28 +01:00
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade && \
|
|
|
|
apk add curl && \
|
|
|
|
apk add git
|
|
|
|
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
2018-06-21 20:36:39 +01:00
|
|
|
COPY . /go/src/storj.io/storj
|
2018-07-02 20:18:28 +01:00
|
|
|
RUN cd /go/src/storj.io/storj && dep ensure -vendor-only
|
2018-08-23 16:48:03 +01:00
|
|
|
RUN cd /go/src/storj.io/storj/cmd/hc && go build -o satellite
|
2018-06-05 22:06:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
# final stage
|
|
|
|
FROM alpine
|
2018-08-23 16:48:03 +01:00
|
|
|
ENV REDIS_ADDR=redis:6379 \
|
2018-07-02 20:18:28 +01:00
|
|
|
REDIS_PASSWORD= \
|
|
|
|
REDIS_DB=0 \
|
2018-08-23 16:48:03 +01:00
|
|
|
IDENTITY_ADDR=:7777 \
|
|
|
|
HTTP_PORT=:8080 \
|
|
|
|
BOOTSTRAP_ADDR=bootstrap.storj.io:8080
|
2018-06-05 22:06:37 +01:00
|
|
|
WORKDIR /app
|
2018-08-23 16:48:03 +01:00
|
|
|
COPY --from=build-env /go/src/storj.io/storj/cmd/hc/satellite /app/
|
|
|
|
COPY cmd/hc/entrypoint /entrypoint
|
2018-07-02 20:18:28 +01:00
|
|
|
EXPOSE 8081/udp \
|
|
|
|
8080 \
|
|
|
|
7070
|
2018-06-05 22:06:37 +01:00
|
|
|
|
2018-08-23 16:48:03 +01:00
|
|
|
ENTRYPOINT ["/entrypoint"]
|