diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..80c8b7b --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,49 @@ +name-template: 'v$RESOLVED_VERSION 🌈' +tag-template: 'v$RESOLVED_VERSION' +categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - 'change' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bug' + - title: '🖊️ Refactors' + labels: + - 'refactor' + - title: '👗 Style' + labels: + - 'style' + - title: '📝 Documentation' + labels: + - 'docs' + - 'documentation' + - title: '🧰 Maintenance' + label: 'chore' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +version-resolver: + major: + labels: + - 'breaking' + minor: + labels: + - 'feature' + - 'enhancement' + - 'change' + - 'refactor' + patch: + labels: + - 'fix' + - 'bug' + - 'style' + - 'docs' + - 'documentation' + - 'chore' + default: patch +sort-by: title +template: | + ## Changes + + $CHANGES diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml new file mode 100644 index 0000000..2575eca --- /dev/null +++ b/.github/workflows/ci-master-pr.yml @@ -0,0 +1,1663 @@ +name: ci-master-pr + +on: + push: + branches: + - master + tags: + - '**' + pull_request: + branches: + - master + merge_group: +jobs: + test-nogitdiff: + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/powershell:lts-7.2-alpine-3.17 + steps: + - run: | + apk add --no-cache git + - uses: actions/checkout@v3 + - name: Ignore git permissions + run: | + git config --global --add safe.directory "$( pwd )" + - name: Generate variants + run: | + pwsh -Command ' + $ErrorActionPreference = "Stop" + Install-Module -Name Generate-DockerImageVariants -Force -Scope CurrentUser -Verbose + Generate-DockerImageVariants . + ' + - name: Test - no git diff + run: | + git diff --exit-code + + build-1-11-1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.11.1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.11.1- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-11-1 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.11.1" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.11.1 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.11.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-1.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) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.11.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-11-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-11-1.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) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.11.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + 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 }}:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-10-1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.10.1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.10.1- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-10-1 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.10.1" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.10.1 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.10.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-10-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-10-1.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.10.1 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.10.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-10-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-10-1.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.10.1 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.10.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-10-1.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-10-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-10-1.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-9-4: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.9.4-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.9.4- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-9-4 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.9.4" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.9.4 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.9.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-9-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-9-4.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.9.4 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.9.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-9-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-9-4.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.9.4 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.9.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-9-4.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-9-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-9-4.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-8-7: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.8.7-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.8.7- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-8-7 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.8.7" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.8.7 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.8.7 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-8-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-8-7.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.8.7 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.8.7 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-8-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-8-7.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.8.7 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.8.7 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-8-7.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-8-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-8-7.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-7-1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.7.1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.7.1- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-7-1 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.7.1" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.7.1 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.7.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-7-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-7-1.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.7.1 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.7.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-7-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-7-1.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.7.1 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.7.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-7-1.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-7-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-7-1.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-6-9: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.6.9-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.6.9- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-6-9 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.6.9" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.6.9 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.6.9 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-6-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-6-9.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.6.9 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.6.9 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-6-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-6-9.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.6.9 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.6.9 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-6-9.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-6-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-6-9.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-5-2: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.5.2-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.5.2- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-5-2 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.5.2" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.5.2 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.5.2 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-5-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-5-2.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.5.2 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.5.2 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-5-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-5-2.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.5.2 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.5.2 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-5-2.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-5-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-5-2.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-4-0: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.4.0-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.4.0- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-4-0 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.4.0" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.4.0 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.4.0 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-4-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-4-0.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.4.0 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.4.0 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-4-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-4-0.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.4.0 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.4.0 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-4-0.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-4-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-4-0.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-3-1: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.3.1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.3.1- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-3-1 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.3.1" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.3.1 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.3.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-3-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-3-1.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.3.1 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.3.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-3-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-3-1.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.3.1 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.3.1 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-3-1.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-3-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-3-1.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-2-6: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.2.6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.2.6- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-2-6 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.2.6" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.2.6 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.2.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-2-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-2-6.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.2.6 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.2.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-2-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-2-6.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.2.6 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.2.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-2-6.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-2-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-2-6.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-1-4: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.1.4-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.1.4- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-1-4 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.1.4" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.1.4 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.1.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-1-4.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.1.4 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.1.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-1-4.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.1.4 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.1.4 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-1-4.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-1-4.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-1-0-6: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-1.0.6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-1.0.6- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-1-0-6 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="1.0.6" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 1.0.6 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/1.0.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-1-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-0-6.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.0.6 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/1.0.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-0-6.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.0.6 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/1.0.6 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-1-0-6.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-1-0-6.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + build-0-9-10: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Display system info (linux) + run: | + set -e + hostname + whoami + cat /etc/*release + lscpu + free + df -h + pwd + docker info + docker version + + # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-0.9.10-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx-0.9.10- + ${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + # This step generates the docker tags + - name: Prepare + id: prep-0-9-10 + run: | + set -e + + # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' + REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + + # Get short commit hash E.g. 'abc0123' + SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + + # Generate docker image tags + # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' + # E.g. 'master-' and 'master-abc0123-' + VARIANT="0.9.10" + REF_VARIANT="${REF}-${VARIANT}" + REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + + # Pass variables to next step + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT + + - name: 0.9.10 - Build (PRs) + # Run only on pull requests + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v3 + with: + context: variants/0.9.10 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: false + tags: | + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: 0.9.10 - Build and push (master) + # Run only on master + if: github.ref == 'refs/heads/master' + uses: docker/build-push-action@v3 + with: + context: variants/0.9.10 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + - name: 0.9.10 - Build and push (release) + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v3 + with: + context: variants/0.9.10 + platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-0-9-10.outputs.REF_SHA_VARIANT }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + + # Temp fix + # https://github.com/docker/build-push-action/issues/252 + # https://github.com/moby/buildkit/issues/1896 + - name: Move cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + + update-draft-release: + needs: + - build-1-11-1 + - build-1-10-1 + - build-1-9-4 + - build-1-8-7 + - build-1-7-1 + - build-1-6-9 + - build-1-5-2 + - build-1-4-0 + - build-1-3-1 + - build-1-2-6 + - build-1-1-4 + - build-1-0-6 + - build-0-9-10 + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + publish: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-draft-release: + needs: + - build-1-11-1 + - build-1-10-1 + - build-1-9-4 + - build-1-8-7 + - build-1-7-1 + - build-1-6-9 + - build-1-5-2 + - build-1-4-0 + - build-1-3-1 + - build-1-2-6 + - build-1-1-4 + - build-1-0-6 + - build-0-9-10 + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + publish: true + name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' + tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + update-dockerhub-description: + needs: + - build-1-11-1 + - build-1-10-1 + - build-1-9-4 + - build-1-8-7 + - build-1-7-1 + - build-1-6-9 + - build-1-5-2 + - build-1-4-0 + - build-1-3-1 + - build-1-2-6 + - build-1-1-4 + - build-1-0-6 + - build-0-9-10 + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v3 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + repository: ${{ github.repository }} + short-description: ${{ github.event.repository.description }} diff --git a/README.md b/README.md new file mode 100644 index 0000000..c37b4fc --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# docker-coredns + +[![github-actions](https://github.com/theohbrothers/docker-coredns/workflows/ci-master-pr/badge.svg)](https://github.com/theohbrothers/docker-coredns/actions) +[![github-release](https://img.shields.io/github/v/release/theohbrothers/docker-coredns?style=flat-square)](https://github.com/theohbrothers/docker-coredns/releases/) +[![docker-image-size](https://img.shields.io/docker/image-size/theohbrothers/docker-coredns/latest)](https://hub.docker.com/r/theohbrothers/docker-coredns) + +Dockerized [coredns](https://github.com/coredns/coredns) based on alpine. + +## Tags + +| Tag | Dockerfile Build Context | +|:-------:|:---------:| +| `:1.11.1`, `:latest` | [View](variants/1.11.1) | +| `:1.10.1` | [View](variants/1.10.1) | +| `:1.9.4` | [View](variants/1.9.4) | +| `:1.8.7` | [View](variants/1.8.7) | +| `:1.7.1` | [View](variants/1.7.1) | +| `:1.6.9` | [View](variants/1.6.9) | +| `:1.5.2` | [View](variants/1.5.2) | +| `:1.4.0` | [View](variants/1.4.0) | +| `:1.3.1` | [View](variants/1.3.1) | +| `:1.2.6` | [View](variants/1.2.6) | +| `:1.1.4` | [View](variants/1.1.4) | +| `:1.0.6` | [View](variants/1.0.6) | +| `:0.9.10` | [View](variants/0.9.10) | + +## Development + +Requires Windows `powershell` or [`pwsh`](https://github.com/PowerShell/PowerShell). + +```powershell +# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants +Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose + +# Edit ./generate templates + +# Generate the variants +Generate-DockerImageVariants . +``` diff --git a/generate/definitions/versions.json b/generate/definitions/versions.json index 6817f9e..4ecab6b 100644 --- a/generate/definitions/versions.json +++ b/generate/definitions/versions.json @@ -1,6 +1,20 @@ { "coredns": { - "versions": [], + "versions": [ + "1.11.1", + "1.10.1", + "1.9.4", + "1.8.7", + "1.7.1", + "1.6.9", + "1.5.2", + "1.4.0", + "1.3.1", + "1.2.6", + "1.1.4", + "1.0.6", + "0.9.10" + ], "versionsChangeScope": "minor", "versionsNewScript": "Invoke-WebRequest https://api.github.com/repos/coredns/coredns/git/refs/tags | ConvertFrom-Json | % { $_.ref -replace 'refs/tags/v', '' } | ? { $_ -match '^\\d+\\.\\d+\\.\\d+$' } | Sort-Object { [version]$_ } -Descending" } diff --git a/variants/0.9.10/Dockerfile b/variants/0.9.10/Dockerfile new file mode 100644 index 0000000..8470b17 --- /dev/null +++ b/variants/0.9.10/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:0.9.10 AS base +FROM alpine:3.15 +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 '0.9.10' -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/0.9.10/docker-entrypoint.sh b/variants/0.9.10/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/0.9.10/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 diff --git a/variants/1.0.6/Dockerfile b/variants/1.0.6/Dockerfile new file mode 100644 index 0000000..209028c --- /dev/null +++ b/variants/1.0.6/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.0.6 AS base +FROM alpine:3.15 +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.0.6' -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.0.6/docker-entrypoint.sh b/variants/1.0.6/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.0.6/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 diff --git a/variants/1.1.4/Dockerfile b/variants/1.1.4/Dockerfile new file mode 100644 index 0000000..af8746b --- /dev/null +++ b/variants/1.1.4/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.1.4 AS base +FROM alpine:3.15 +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.1.4' -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.1.4/docker-entrypoint.sh b/variants/1.1.4/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.1.4/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 diff --git a/variants/1.10.1/Dockerfile b/variants/1.10.1/Dockerfile new file mode 100644 index 0000000..e2dc7c1 --- /dev/null +++ b/variants/1.10.1/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.10.1 AS base +FROM alpine:3.15 +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.10.1' -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.10.1/docker-entrypoint.sh b/variants/1.10.1/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.10.1/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 diff --git a/variants/1.11.1/Dockerfile b/variants/1.11.1/Dockerfile new file mode 100644 index 0000000..3d0dbfd --- /dev/null +++ b/variants/1.11.1/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.11.1 AS base +FROM alpine:3.15 +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.1' -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.1/docker-entrypoint.sh b/variants/1.11.1/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.11.1/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 diff --git a/variants/1.2.6/Dockerfile b/variants/1.2.6/Dockerfile new file mode 100644 index 0000000..0a414b5 --- /dev/null +++ b/variants/1.2.6/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.2.6 AS base +FROM alpine:3.15 +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.2.6' -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.2.6/docker-entrypoint.sh b/variants/1.2.6/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.2.6/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 diff --git a/variants/1.3.1/Dockerfile b/variants/1.3.1/Dockerfile new file mode 100644 index 0000000..744d1fc --- /dev/null +++ b/variants/1.3.1/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.3.1 AS base +FROM alpine:3.15 +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.3.1' -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.3.1/docker-entrypoint.sh b/variants/1.3.1/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.3.1/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 diff --git a/variants/1.4.0/Dockerfile b/variants/1.4.0/Dockerfile new file mode 100644 index 0000000..0449e65 --- /dev/null +++ b/variants/1.4.0/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.4.0 AS base +FROM alpine:3.15 +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.4.0' -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.4.0/docker-entrypoint.sh b/variants/1.4.0/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.4.0/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 diff --git a/variants/1.5.2/Dockerfile b/variants/1.5.2/Dockerfile new file mode 100644 index 0000000..6fd95d8 --- /dev/null +++ b/variants/1.5.2/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.5.2 AS base +FROM alpine:3.15 +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.5.2' -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.5.2/docker-entrypoint.sh b/variants/1.5.2/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.5.2/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 diff --git a/variants/1.6.9/Dockerfile b/variants/1.6.9/Dockerfile new file mode 100644 index 0000000..b268626 --- /dev/null +++ b/variants/1.6.9/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.6.9 AS base +FROM alpine:3.15 +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.6.9' -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.6.9/docker-entrypoint.sh b/variants/1.6.9/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.6.9/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 diff --git a/variants/1.7.1/Dockerfile b/variants/1.7.1/Dockerfile new file mode 100644 index 0000000..d26eb9f --- /dev/null +++ b/variants/1.7.1/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.7.1 AS base +FROM alpine:3.15 +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.7.1' -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.7.1/docker-entrypoint.sh b/variants/1.7.1/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.7.1/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 diff --git a/variants/1.8.7/Dockerfile b/variants/1.8.7/Dockerfile new file mode 100644 index 0000000..e9e89b3 --- /dev/null +++ b/variants/1.8.7/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.8.7 AS base +FROM alpine:3.15 +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.8.7' -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.8.7/docker-entrypoint.sh b/variants/1.8.7/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.8.7/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 diff --git a/variants/1.9.4/Dockerfile b/variants/1.9.4/Dockerfile new file mode 100644 index 0000000..2270152 --- /dev/null +++ b/variants/1.9.4/Dockerfile @@ -0,0 +1,16 @@ +FROM coredns/coredns:1.9.4 AS base +FROM alpine:3.15 +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.9.4' -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.9.4/docker-entrypoint.sh b/variants/1.9.4/docker-entrypoint.sh new file mode 100644 index 0000000..f83b36f --- /dev/null +++ b/variants/1.9.4/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