From 1198dceb1a1b9805cb27baef1d01934ad3bb279d Mon Sep 17 00:00:00 2001 From: Yann Hamon Date: Thu, 23 Mar 2023 10:37:44 +0100 Subject: [PATCH] Remove Dockerhub, Update CoreDNS, update various deps --- .github/workflows/build.yml | 12 ------------ Dockerfile | 6 +++--- Makefile | 2 +- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83df5b5..de956ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,30 +36,18 @@ jobs: - name: publish-latest run: | - # Dockerhub - docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:latest - docker push contentful/coredns-nodecache:latest - # GHCR docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:latest docker push ghcr.io/contentful-labs/coredns-nodecache:latest if: github.ref == 'refs/heads/master' - name: publish-branch run: | - # Dockerhub - docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/} - docker push contentful/coredns-nodecache:${GITHUB_REF##*/} - # GHCR docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/} docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/} if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/master' - name: publish-tag run: | - # Dockerhub - docker tag contentful-labs/coredns-nodecache:latest contentful/coredns-nodecache:${GITHUB_REF##*/} - docker push contentful/coredns-nodecache:${GITHUB_REF##*/} - # GHCR docker tag contentful-labs/coredns-nodecache:latest ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/} docker push ghcr.io/contentful-labs/coredns-nodecache:${GITHUB_REF##*/} if: startsWith(github.ref, 'refs/tags/v') diff --git a/Dockerfile b/Dockerfile index abb1c55..224e255 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM golang:1.18-buster AS builder +FROM golang:1.20-buster AS builder RUN apt update && apt upgrade -y && apt install iptables -y -RUN git clone --single-branch --branch v1.9.3 https://github.com/coredns/coredns.git /coredns +RUN git clone --single-branch --branch v1.10.1 https://github.com/coredns/coredns.git /coredns WORKDIR /coredns @@ -16,7 +16,7 @@ COPY *.go /coredns/plugin/nodecache/ RUN make RUN chmod 0755 /coredns/coredns -FROM alpine:3.15 +FROM alpine:3.17 RUN apk add iptables COPY --from=builder /coredns/coredns / diff --git a/Makefile b/Makefile index 4a8df54..5ce044d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ run: build test: docker run -t -v $$PWD:/go/src/github.com/contentful-labs/coredns-nodecache \ - -w /go/src/github.com/contentful-labs/coredns-nodecache/ golang:1.18-buster go test -v -mod=vendor ./... + -w /go/src/github.com/contentful-labs/coredns-nodecache/ golang:1.20-buster go test -v -mod=vendor ./... lint: docker run -t -v $$PWD:/go/src/github.com/contentful-labs/coredns-nodecache \