kube-fetcher/Dockerfile
Erik Brakkee b31e03bc7a Initial pull implemented.
Support for proxy repositories by pulling from the proxy and then tagging the image.
2025-03-09 14:18:29 +01:00

25 lines
478 B
Docker

FROM alpine:3.20.3 as builder
RUN apk update && apk add go
RUN mkdir -p /opt/fetcher/bin
WORKDIR /opt/fetcher
ENV CGO_ENABLED=0
ENV GOTOOLCHAIN=auto
COPY go.mod go.sum /opt/fetcher/
RUN go mod download
COPY cmd /opt/fetcher/cmd/
COPY pkg /opt/fetcher/pkg/
RUN go build -o bin ./cmd/...
RUN find . -type f
FROM alpine:3.20.3
RUN apk update && apk add ca-certificates
COPY --from=builder /opt/fetcher/bin/fetcher /opt/fetcher/bin/
ENTRYPOINT ["/opt/fetcher/bin/fetcher" ]