2018-01-17 22:40:14 +01:00
|
|
|
# Build status-go in a Go builder container
|
2018-05-07 23:58:09 +03:00
|
|
|
FROM golang:1.10-alpine as builder
|
2017-05-12 15:04:32 +03:00
|
|
|
|
2018-01-30 12:51:48 +01:00
|
|
|
ARG build_tags
|
2018-06-08 11:20:30 +02:00
|
|
|
ARG build_flags
|
2018-01-30 12:51:48 +01:00
|
|
|
|
2018-01-03 19:50:19 +01:00
|
|
|
RUN apk add --no-cache make gcc musl-dev linux-headers
|
2017-05-12 15:04:32 +03:00
|
|
|
|
2018-01-03 19:50:19 +01:00
|
|
|
RUN mkdir -p /go/src/github.com/status-im/status-go
|
|
|
|
ADD . /go/src/github.com/status-im/status-go
|
2018-06-08 11:20:30 +02:00
|
|
|
RUN cd /go/src/github.com/status-im/status-go && \
|
|
|
|
make statusgo \
|
|
|
|
BUILD_TAGS="$build_tags" \
|
|
|
|
BUILD_FLAGS="$build_flags"
|
2017-05-12 15:04:32 +03:00
|
|
|
|
2018-01-03 19:50:19 +01:00
|
|
|
# Copy the binary to the second image
|
|
|
|
FROM alpine:latest
|
|
|
|
|
2018-07-10 11:29:40 +02:00
|
|
|
LABEL source="https://github.com/status-im/status-go"
|
|
|
|
LABEL description="status-go is an underlying part of Status - a browser, messenger, and gateway to a decentralized world."
|
|
|
|
LABEL maintainer="support@status.im"
|
|
|
|
|
2018-01-03 19:50:19 +01:00
|
|
|
RUN apk add --no-cache ca-certificates bash
|
2018-01-30 12:51:48 +01:00
|
|
|
|
2018-05-18 16:43:07 +03:00
|
|
|
COPY --from=builder /go/src/github.com/status-im/status-go/build/bin/statusd /usr/local/bin/
|
2018-01-03 19:50:19 +01:00
|
|
|
|
|
|
|
RUN mkdir -p /static/keys
|
|
|
|
COPY --from=builder /go/src/github.com/status-im/status-go/static/keys/* /static/keys/
|
|
|
|
|
|
|
|
# 30304 is used for Discovery v5
|
|
|
|
EXPOSE 8080 8545 30303 30303/udp 30304/udp
|
2018-07-10 11:29:40 +02:00
|
|
|
|
2018-07-11 13:45:27 +02:00
|
|
|
ENTRYPOINT ["/usr/local/bin/statusd"]
|
|
|
|
CMD ["--help"]
|