From d07efa97190af359ac88acc91d0b66c6eb272eb5 Mon Sep 17 00:00:00 2001 From: Mauro Torrez Date: Tue, 27 Feb 2024 16:14:22 -0300 Subject: [PATCH] update dockerfile (multiarch) --- Dockerfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f741f9..bcfbefe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,14 @@ ARG DEBIAN_VERSION=bullseye-slim -FROM golang:1.9-alpine as confd -ARG CONFD_VERSION=0.16.0 -ADD https://github.com/kelseyhightower/confd/archive/v${CONFD_VERSION}.tar.gz /tmp/ -RUN apk add --no-cache \ - bzip2 \ - make \ - gcc && \ - mkdir -p /go/src/github.com/kelseyhightower/confd && \ - cd /go/src/github.com/kelseyhightower/confd && \ - tar --strip-components=1 -zxf /tmp/v${CONFD_VERSION}.tar.gz && \ - go install github.com/kelseyhightower/confd && \ - rm -rf /tmp/v${CONFD_VERSION}.tar.gz +FROM golang:bookworm as confd +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + && git clone https://github.com/kelseyhightower/confd.git \ + && cd confd \ + && make FROM debian:${DEBIAN_VERSION} -COPY --from=confd /go/bin/confd /usr/local/bin/confd +COPY --from=confd /go/confd/bin/confd /usr/local/bin/confd RUN mkdir -p /start.d \ && printf '#!/bin/bash\nset -e\n/usr/local/bin/confd -onetime -backend env\nrun-parts -v /start.d\nexec ${@}\n' > /entrypoint.sh \ && mkdir -p /etc/confd/conf.d /etc/confd/templates \