From fa86072b3cd49974cdacbaad4150b25ca743fd46 Mon Sep 17 00:00:00 2001 From: The Oh Brothers Bot Date: Mon, 1 Jul 2024 01:07:10 +0000 Subject: [PATCH] Enhancement: Bump coredns 1.11 variants to 1.11.3 Signed-off-by: The Oh Brothers Bot --- .github/workflows/ci-master-pr.yml | 42 ++++++++++++++-------------- README.md | 2 +- generate/definitions/versions.json | 2 +- variants/1.11.3/Dockerfile | 16 +++++++++++ variants/1.11.3/docker-entrypoint.sh | 8 ++++++ 5 files changed, 47 insertions(+), 23 deletions(-) create mode 100644 variants/1.11.3/Dockerfile create mode 100644 variants/1.11.3/docker-entrypoint.sh diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 3de82ff..c6c9179 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -33,7 +33,7 @@ jobs: run: | git diff --exit-code - build-1-11-1: + build-1-11-3: runs-on: ubuntu-latest steps: - name: Checkout @@ -64,9 +64,9 @@ jobs: uses: actions/cache@v4 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-1.11.1-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.11.3-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-1.11.1- + ${{ runner.os }}-buildx-1.11.3- ${{ runner.os }}-buildx- - name: Login to Docker Hub registry @@ -79,7 +79,7 @@ jobs: # This step generates the docker tags - name: Prepare - id: prep-1-11-1 + id: prep-1-11-3 run: | set -e @@ -92,7 +92,7 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - VARIANT="1.11.1" + VARIANT="1.11.3" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" @@ -102,45 +102,45 @@ jobs: echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: 1.11.1 - Build (PRs) + - name: 1.11.3 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v5 with: - context: variants/1.11.1 + context: variants/1.11.3 platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x push: false tags: | - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 1.11.1 - Build and push (master) + - name: 1.11.3 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v5 with: - context: variants/1.11.1 + context: variants/1.11.3 platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x push: true tags: | - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: 1.11.1 - Build and push (release) + - name: 1.11.3 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v5 with: - context: variants/1.11.1 + context: variants/1.11.3 platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x push: true tags: | - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.VARIANT }} - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }} - ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-3.outputs.REF_SHA_VARIANT }} ${{ github.repository }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1583,7 +1583,7 @@ jobs: update-draft-release: needs: - - build-1-11-1 + - build-1-11-3 - build-1-10-1 - build-1-9-4 - build-1-8-7 @@ -1609,7 +1609,7 @@ jobs: publish-draft-release: needs: - - build-1-11-1 + - build-1-11-3 - build-1-10-1 - build-1-9-4 - build-1-8-7 @@ -1637,7 +1637,7 @@ jobs: update-dockerhub-description: needs: - - build-1-11-1 + - build-1-11-3 - build-1-10-1 - build-1-9-4 - build-1-8-7 diff --git a/README.md b/README.md index dc1a97b..d892d35 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Whereas [official coredns docker image](https://hub.docker.com/r/coredns/coredns | Tag | Dockerfile Build Context | |:-------:|:---------:| -| `:1.11.1`, `:latest` | [View](variants/1.11.1) | +| `:1.11.3`, `:latest` | [View](variants/1.11.3) | | `:1.10.1` | [View](variants/1.10.1) | | `:1.9.4` | [View](variants/1.9.4) | | `:1.8.7` | [View](variants/1.8.7) | diff --git a/generate/definitions/versions.json b/generate/definitions/versions.json index e7c6e07..6a272d4 100644 --- a/generate/definitions/versions.json +++ b/generate/definitions/versions.json @@ -1,7 +1,7 @@ { "coredns": { "versions": [ - "1.11.1", + "1.11.3", "1.10.1", "1.9.4", "1.8.7", diff --git a/variants/1.11.3/Dockerfile b/variants/1.11.3/Dockerfile new file mode 100644 index 0000000..f50b098 --- /dev/null +++ b/variants/1.11.3/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.11.3 AS base +FROM alpine:3.15 AS final +ARG TARGETPLATFORM +ARG BUILDPLATFORM +RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" + +COPY --from=base /coredns /coredns +RUN set -eux; \ + /coredns --version | grep '1.11.3' -A100 -B100 + +RUN apk add --no-cache ca-certificates + +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x docker-entrypoint.sh +EXPOSE 53/tcp 53/udp +ENTRYPOINT [ "/docker-entrypoint.sh" ] diff --git a/variants/1.11.3/docker-entrypoint.sh b/variants/1.11.3/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.11.3/docker-entrypoint.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then + set -- coredns "$@" +fi + +exec "$@" \ No newline at end of file