Add Dockerfile

This commit is contained in:
Jack Zampolin
2018-07-12 16:22:19 -07:00
parent 2263a7d258
commit c8f70d0445
2 changed files with 36 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
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
RUN make update-tools get-vendor-deps build
# Final image
FROM alpine:edge
# Install ca-certificates
RUN apk add --update ca-certificates
WORKDIR /root
# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/ethermint /usr/bin/ethermint
# Run ethermint by default
CMD ["ethermint"]