From 36851fe6f8890a7c8405c243db98dee33e62c2dd Mon Sep 17 00:00:00 2001 From: Jussi Nummelin Date: Tue, 2 May 2023 21:42:19 +0300 Subject: [PATCH 1/2] Create coredns:1.10.1-1 with golang.org/x/net bumped to 0.7.0 Signed-off-by: Jussi Nummelin --- images/coredns/{1.10.1 => 1.10.1-1}/Dockerfile | 2 +- images/coredns/{1.10.1 => 1.10.1-1}/Makefile | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename images/coredns/{1.10.1 => 1.10.1-1}/Dockerfile (91%) rename images/coredns/{1.10.1 => 1.10.1-1}/Makefile (100%) 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 From 4447a94489c019481d8aa3d1c77c766628be7337 Mon Sep 17 00:00:00 2001 From: Jussi Nummelin Date: Tue, 2 May 2023 21:44:00 +0300 Subject: [PATCH 2/2] Create simple Makefile for eased up local dev/scan This allows one to easily build and scan the needed images when working locally. To build: ``` make build-coredns:1.10.1 ``` To scan: ``` make scan-coredns:1.10.1 ``` Signed-off-by: Jussi Nummelin --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Makefile 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)