mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-11 05:59:22 +00:00
Add ca certificates to docker image
This commit is contained in:
parent
798e99c50b
commit
a9ad8b4290
2 changed files with 8 additions and 8 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,11 +1,8 @@
|
|||
FROM golang:1.14 AS builder
|
||||
|
||||
RUN mkdir -p github.com/yannh/kubeconform
|
||||
COPY . github.com/yannh/kubeconform/
|
||||
WORKDIR github.com/yannh/kubeconform
|
||||
RUN make build-static
|
||||
FROM alpine:latest as certs
|
||||
RUN apk add ca-certificates
|
||||
|
||||
FROM scratch AS kubeconform
|
||||
MAINTAINER Yann HAMON <yann@mandragor.org>
|
||||
COPY --from=builder /go/github.com/yannh/kubeconform/bin/kubeconform /
|
||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY bin/kubeconform /
|
||||
ENTRYPOINT ["/kubeconform"]
|
||||
5
Makefile
5
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
.PHONY: test-build test build build-static docker-test docker-build-static build-bats docker-acceptance
|
||||
.PHONY: test-build test build build-static docker-test docker-build-static build-bats docker-acceptance docker-image
|
||||
|
||||
test-build: test build
|
||||
|
||||
|
|
@ -10,6 +10,9 @@ test:
|
|||
build:
|
||||
go build -o bin/kubeconform
|
||||
|
||||
docker-image:
|
||||
docker build -t kubeconform .
|
||||
|
||||
build-static:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o bin/kubeconform
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue