ddns/Dockerfile
maximo tejeda 302cc8d7d6
All checks were successful
Go-tags / build (push) Successful in 2m13s
FIX DOCKER FILE
2024-11-15 11:52:26 -04:00

17 lines
438 B
Docker

FROM golang:alpine AS builder
ARG BUILDARCH
ARG version=not-set
ARG SHORTSHA=not-set
WORKDIR /app
COPY . .
# https://stackoverflow.com/questions/70369368/check-architecture-in-dockerfile-to-get-amd-arm
RUN go build -o bin/ddns \
-ldflags "-X main.Shortsha=${SHORTSHA} \
-X main.Version=${version} \
-X main.Aarch=${BUILDARCH}" ./cmd
FROM alpine AS runner
COPY --from=builder /app/bin/ddns /usr/bin/
ENTRYPOINT /usr/bin/ddns