From ac2965c89c61a2fec099f5df2730a9f4253bb3ea Mon Sep 17 00:00:00 2001 From: mkelcik Date: Sat, 29 Apr 2023 15:04:59 +0200 Subject: [PATCH 1/3] add image for raspeberry --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1fbdd89..cdfc9a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,13 @@ FROM golang:1.20 as build COPY . /opt/project/ WORKDIR /opt/project +RUN apt update +RUN apt-get install -y ca-certificates + RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /cloudflare-ddns-updater FROM scratch +COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=build /cloudflare-ddns-updater /cloudflare-ddns-updater -ENTRYPOINT ["/cloudflare-ddns-updater"] \ No newline at end of file +ENTRYPOINT ["/cloudflare-ddns-updater"] +CMD ["cloudflare-ddns-updater"] \ No newline at end of file From 50eb25a6c8d0486d006164758926f43f1b64a3a7 Mon Sep 17 00:00:00 2001 From: mkelcik Date: Sat, 29 Apr 2023 15:06:25 +0200 Subject: [PATCH 2/3] fix lint --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cdfc9a6..61c60b3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,7 @@ FROM golang:1.20 as build COPY . /opt/project/ WORKDIR /opt/project -RUN apt update -RUN apt-get install -y ca-certificates +RUN apt update && apt-get install -y ca-certificates RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /cloudflare-ddns-updater From 3aa0b4c5ec25e2bc1520b899b523dec271d3c5ca Mon Sep 17 00:00:00 2001 From: mkelcik Date: Sat, 29 Apr 2023 15:08:59 +0200 Subject: [PATCH 3/3] fix lint --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 61c60b3..6837b93 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM golang:1.20 as build COPY . /opt/project/ WORKDIR /opt/project -RUN apt update && apt-get install -y ca-certificates +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /cloudflare-ddns-updater