updated Dockerfile (#175)

This commit is contained in:
Ajoy Das 2020-03-18 18:43:02 +06:00 committed by GitHub
parent 85019f2283
commit ca435c2bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,10 @@
FROM golang:alpine AS build-env FROM golang:alpine AS build-env
# Set up dependencies # Set up dependencies
ENV PACKAGES make git curl build-base ENV PACKAGES git build-base
# Set working directory for the build # Set working directory for the build
WORKDIR /go/src/github.com/cosmos/ethermint WORKDIR /go/src/github.com/Chainsafe/ethermint
# Install dependencies # Install dependencies
RUN apk add --update $PACKAGES RUN apk add --update $PACKAGES
@ -13,7 +13,7 @@ RUN apk add --update $PACKAGES
COPY . . COPY . .
# Make the binary # Make the binary
RUN make tools deps build RUN make build
# Final image # Final image
FROM alpine FROM alpine
@ -23,7 +23,8 @@ RUN apk add --update ca-certificates
WORKDIR /root WORKDIR /root
# Copy over binaries from the build-env # Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/emintd /usr/bin/emintd COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/emintd /usr/bin/emintd
COPY --from=build-env /go/src/github.com/Chainsafe/ethermint/build/emintcli /usr/bin/emintcli
# Run emintd by default # Run emintd by default
CMD ["emintd"] CMD ["emintd"]