Build Go binary inside Docker (#22)

* Build Go binary inside Docker

You can (and should) use Docker to build Go programs. With this updated `Dockerfile` you can build the binary with one simple command `docker build -t your-image-name:tag .`, then push it to your favorite registry and use it in the Helm chart.

* Update Dockerfile from origin
This commit is contained in:
Volker Thiel 2020-02-25 19:04:42 +01:00 committed by GitHub
parent 9155435e2d
commit 3abf447b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,8 @@
FROM golang:alpine AS build
WORKDIR /app
ADD . /app
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/ingress-controller ./cmd/caddy
FROM alpine:latest as certs
RUN apk --update add ca-certificates