code/autoregistry/proxy/Dockerfile

17 lines
330 B
Docker
Raw Permalink Normal View History

2024-08-31 17:58:24 +00:00
FROM alpine:3.20.0 as builder
RUN apk update && apk add go
RUN mkdir /opt/proxy
COPY go.* /opt/proxy/
WORKDIR /opt/proxy
RUN go mod download
COPY *.go /opt/proxy/
RUN go build
FROM scratch
COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/
COPY --from=builder /opt/proxy/proxy /opt/proxy/proxy
ENTRYPOINT ["/opt/proxy/proxy"]