diff options
| author | James Munnelly <james@munnelly.eu> | 2019-04-29 17:55:26 +0100 |
|---|---|---|
| committer | James Munnelly <james@munnelly.eu> | 2019-04-29 17:55:46 +0100 |
| commit | 3935fd70e743931e6322bf088cd3e1c866f2e2cd (patch) | |
| tree | 5eca322b82b303ab26b9ccb2565b38a46febfb82 /Dockerfile | |
| parent | 2764e68e074ce4eb7c7ad3d6ee3aaaa59e2fd1de (diff) | |
| download | cert-manager-webhook-hostinger-3935fd70e743931e6322bf088cd3e1c866f2e2cd.tar.gz cert-manager-webhook-hostinger-3935fd70e743931e6322bf088cd3e1c866f2e2cd.zip | |
Update Helm chart and Dockerfile
Signed-off-by: James Munnelly <james@munnelly.eu>
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -1,7 +1,25 @@ -FROM golang:1.12.1 +FROM golang:1.12.4-alpine AS build_deps -COPY . /workspace +RUN apk add --no-cache git WORKDIR /workspace -RUN go build +ENV GO111MODULE=on +COPY go.mod . +COPY go.sum . + +RUN go mod download + +FROM build_deps AS build + +COPY . . + +RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' . + +FROM alpine:3.9 + +RUN apk add --no-cache ca-certificates + +COPY --from=build /workspace/webhook /usr/local/bin/webhook + +ENTRYPOINT ["webhook"] |
