From 40309ce6a3f1bfff1ffdcfa33f8802755b83a749 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Mon, 11 Mar 2024 18:28:22 +0100 Subject: [PATCH] Update to Alpine 3.19/Go 1.22/CoreDNS 1.8.7 --- Dockerfile | 3 ++- build.yaml | 12 ++++++------ plugins/fallback/fallback.go | 2 +- plugins/fallback/fallback_test.go | 3 +-- plugins/mdns/mdns.go | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5485663..698227d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG BUILD_FROM -FROM golang:1.15-alpine3.13 AS builder +FROM golang:1.22-alpine3.19 AS builder WORKDIR /usr/src ARG BUILD_ARCH @@ -27,6 +27,7 @@ RUN \ && sed -i "/kubernetes:kubernetes/d" plugin.cfg \ && sed -i "/etcd:etcd/d" plugin.cfg \ && sed -i "/grpc:grpc/d" plugin.cfg \ + && go mod tidy \ && go generate \ && \ if [ "${BUILD_ARCH}" = "armhf" ]; then \ diff --git a/build.yaml b/build.yaml index cc5a35c..369979b 100644 --- a/build.yaml +++ b/build.yaml @@ -1,11 +1,11 @@ image: homeassistant/{arch}-hassio-dns shadow_repository: ghcr.io/home-assistant build_from: - aarch64: ghcr.io/home-assistant/aarch64-base:3.14 - armhf: ghcr.io/home-assistant/armhf-base:3.14 - armv7: ghcr.io/home-assistant/armv7-base:3.14 - amd64: ghcr.io/home-assistant/amd64-base:3.14 - i386: ghcr.io/home-assistant/i386-base:3.14 + aarch64: ghcr.io/home-assistant/aarch64-base:3.19 + armhf: ghcr.io/home-assistant/armhf-base:3.19 + armv7: ghcr.io/home-assistant/armv7-base:3.19 + amd64: ghcr.io/home-assistant/amd64-base:3.19 + i386: ghcr.io/home-assistant/i386-base:3.19 codenotary: signer: notary@home-assistant.io base_image: notary@home-assistant.io @@ -19,4 +19,4 @@ labels: org.opencontainers.image.documentation: https://www.home-assistant.io/docs/ org.opencontainers.image.licenses: Apache License 2.0 args: - COREDNS_VERSION: 1.8.4 + COREDNS_VERSION: 1.8.7 diff --git a/plugins/fallback/fallback.go b/plugins/fallback/fallback.go index b2b1509..57f2858 100644 --- a/plugins/fallback/fallback.go +++ b/plugins/fallback/fallback.go @@ -2,7 +2,7 @@ package fallback import ( - "golang.org/x/net/context" + "context" "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/pkg/nonwriter" diff --git a/plugins/fallback/fallback_test.go b/plugins/fallback/fallback_test.go index 0b95135..918e148 100644 --- a/plugins/fallback/fallback_test.go +++ b/plugins/fallback/fallback_test.go @@ -1,10 +1,9 @@ package fallback import ( + "context" "testing" - "golang.org/x/net/context" - "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/test" diff --git a/plugins/mdns/mdns.go b/plugins/mdns/mdns.go index 90d07e4..87f02f8 100644 --- a/plugins/mdns/mdns.go +++ b/plugins/mdns/mdns.go @@ -1,6 +1,7 @@ package mdns import ( + "context" "net" "strings" "syscall" @@ -11,7 +12,6 @@ import ( "github.com/coredns/coredns/request" "github.com/miekg/dns" - "golang.org/x/net/context" ) var log = clog.NewWithPlugin("mdns")