diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..e63c0662 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ + +IMG_PATH ?= images/$(subst :,/,$(IMG)) + +.PHONY: build-% + +build-%: IMG ?= $(subst build-,,$@) +build-%: + docker build -t $(IMG) -f $(IMG_PATH)/Dockerfile $(IMG_PATH) + +.PHONY: scan-% + +scan-%: IMG ?= $(subst scan-,,$@) +scan-%: + trivy image --ignore-unfixed --exit-code 42 $(IMG) diff --git a/images/coredns/1.10.1/Dockerfile b/images/coredns/1.10.1-1/Dockerfile similarity index 91% rename from images/coredns/1.10.1/Dockerfile rename to images/coredns/1.10.1-1/Dockerfile index a17731a0..589143b1 100644 --- a/images/coredns/1.10.1/Dockerfile +++ b/images/coredns/1.10.1-1/Dockerfile @@ -5,7 +5,7 @@ RUN git clone -b v1.10.1 https://github.com/coredns/coredns.git /coredns WORKDIR /coredns RUN export GIT_COMMIT=$(git describe --dirty --always) && \ - go get -u golang.org/x/net@v0.4.0 && \ + go get -u golang.org/x/net@v0.7.0 && \ CGO_ENABLED=0 go build -ldflags="-s -w -X github.com/coredns/coredns/coremain.GitCommit=$GIT_COMMIT" FROM scratch diff --git a/images/coredns/1.10.1/Makefile b/images/coredns/1.10.1-1/Makefile similarity index 100% rename from images/coredns/1.10.1/Makefile rename to images/coredns/1.10.1-1/Makefile