Added a Dockerfile to build the tool in a docker container

Use an alpine base image. The image size is 40MB.
This commit is contained in:
Valentin Mihov
2020-05-15 16:41:16 +03:00
parent b3bbeea3fb
commit 0c8029c950
2 changed files with 47 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM golang:1.14.2-alpine3.11 as builder
RUN apk add build-base
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build
FROM alpine:3.11
RUN apk add libstdc++
WORKDIR /app
COPY --from=builder /app/ethdo /app
ENTRYPOINT ["/app/ethdo"]