Add Dockerfile
Some checks failed
release / goreleaser (push) Has been cancelled

This commit also disable the docker building process performed by
 goreleaser. Docker containers are built now by hub.docker.com.
This commit is contained in:
Gustavo Chain 2020-03-31 20:42:03 +02:00
parent 89085c721c
commit 5e57b325d9
No known key found for this signature in database
GPG Key ID: DA7C1746DC118A46
3 changed files with 10 additions and 14 deletions

View File

@ -16,13 +16,6 @@ builds:
- arm
- arm64
dockers:
-
dockerfile: Dockerfile.goreleaser
image_templates:
- "mempool/mempool-cli:latest"
- "mempool/mempool-cli:{{ .Tag }}"
archives:
- replacements:
linux: Linux

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM golang:1.14-alpine
RUN apk --no-cache add ca-certificates
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o mempool-cli .
FROM scratch
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=0 /src/mempool-cli /
ENTRYPOINT ["/mempool-cli"]

View File

@ -1,7 +0,0 @@
FROM alpine as certs
RUN apk --no-cache add ca-certificates
FROM scratch
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY mempool-cli /
ENTRYPOINT ["/mempool-cli"]