feat: first cut at building docker images

- Update .goreleaser to build docker images
- Update Dockerfile to work with goreleaser
- Update examples/docker/awscli/Dockerfile to pull kapow docker image

Co-authored-by: César Gallego <gallego.cesar@gmail.com>
Co-authored-by: Roberto Abdelkader Martínez Pérez <robertomartinezp@gmail.com>
Co-authored-by: Héctor Hurtado <hector.hurtado@bbva.com>
This commit is contained in:
pancho horrillo
2020-05-05 17:57:18 +02:00
committed by pancho horrillo
parent 6249dce11d
commit ae5bd9b395
3 changed files with 24 additions and 8 deletions
+22 -1
View File
@@ -1,8 +1,12 @@
before:
hooks:
- go mod tidy
project_name: kapow
builds:
- flags:
- id: kapow
flags:
- -trimpath
env:
- CGO_ENABLED=0
@@ -38,3 +42,20 @@ signs:
- artifacts: checksum
signature: "${artifact}.GPG"
args: ["--batch", "--local-user", "release-bot@kapow", "--output", "${signature}", "--armor", "--clear-sign", "${artifact}"]
dockers:
- goos: linux
goarch: amd64
goarm: ''
binaries:
- kapow
builds:
- kapow
image_templates:
- "bbvalabsci/kapow:latest"
- "bbvalabsci/kapow:{{ .Tag }}"
- "bbvalabsci/kapow:{{ .Tag }}-{{ .Env.GO_VERSION }}"
- "bbvalabsci/kapow:v{{ .Major }}"
+1 -6
View File
@@ -1,7 +1,2 @@
FROM golang:1.14 as build
RUN go get github.com/BBVA/kapow
RUN CGO_ENABLED=0 GOOS=linux go install github.com/BBVA/kapow
FROM scratch
COPY --from=build /go/bin/kapow /kapow
COPY kapow /
+1 -1
View File
@@ -1,4 +1,4 @@
FROM kapow:latest as kp
FROM bbvalabsci/kapow:latest as kp
FROM amazon/aws-cli:latest
COPY --from=kp /kapow /usr/bin/kapow