use multistep in docker-image

This commit is contained in:
Yann Hamon 2021-02-14 18:56:34 +01:00
parent 959ecc7260
commit f3d6607b28
2 changed files with 7 additions and 4 deletions

View file

@ -10,9 +10,6 @@ jobs:
- name: test
run: make docker-test
- name: build
run: make docker-build-static
- name: acceptance-test
run: make docker-acceptance

View file

@ -1,8 +1,14 @@
FROM alpine:latest as certs
RUN apk add ca-certificates
FROM golang:1.14 as build
WORKDIR /go/src/github.com/yannh/kubeconform
COPY . .
RUN make build-static
RUN find
FROM scratch AS kubeconform
MAINTAINER Yann HAMON <yann@mandragor.org>
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY bin/kubeconform /
COPY --from=build bin/kubeconform /kubeconform
ENTRYPOINT ["/kubeconform"]