2018-07-12 23:22:19 +00:00
|
|
|
FROM golang:alpine AS build-env
|
|
|
|
|
|
|
|
# Set up dependencies
|
|
|
|
ENV PACKAGES make git curl build-base
|
|
|
|
|
|
|
|
# Set working directory for the build
|
|
|
|
WORKDIR /go/src/github.com/cosmos/ethermint
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
RUN apk add --update $PACKAGES
|
|
|
|
|
|
|
|
# Add source files
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
# Make the binary
|
2018-07-13 20:58:22 +00:00
|
|
|
RUN make tools deps build
|
2018-07-12 23:22:19 +00:00
|
|
|
|
|
|
|
# Final image
|
2018-11-27 18:31:39 +00:00
|
|
|
FROM alpine
|
2018-07-12 23:22:19 +00:00
|
|
|
|
|
|
|
# Install ca-certificates
|
|
|
|
RUN apk add --update ca-certificates
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
# Copy over binaries from the build-env
|
2018-11-27 18:31:39 +00:00
|
|
|
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/emintd /usr/bin/emintd
|
2018-07-12 23:22:19 +00:00
|
|
|
|
2018-11-27 18:31:39 +00:00
|
|
|
# Run emintd by default
|
|
|
|
CMD ["emintd"]
|