status-go/_assets/build/Dockerfile

34 lines
1.0 KiB
Docker
Raw Normal View History

# Build status-go in a Go builder container
2019-10-14 14:10:48 +00:00
FROM golang:1.13-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers
ARG build_tags
ARG build_flags
2018-01-03 18:50:19 +00:00
RUN mkdir -p /go/src/github.com/status-im/status-go
ADD . /go/src/github.com/status-im/status-go
RUN cd /go/src/github.com/status-im/status-go && \
make statusgo \
BUILD_TAGS="$build_tags" \
BUILD_FLAGS="$build_flags"
2018-01-03 18:50:19 +00:00
# Copy the binary to the second image
FROM alpine:latest
LABEL maintainer="support@status.im"
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."
2018-01-03 18:50:19 +00:00
RUN apk add --no-cache ca-certificates bash
RUN mkdir -p /static/keys
COPY --from=builder /go/src/github.com/status-im/status-go/build/bin/statusd /usr/local/bin/
2018-01-03 18:50:19 +00:00
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
ENTRYPOINT ["/usr/local/bin/statusd"]
CMD ["--help"]