17 lines
330 B
Docker
17 lines
330 B
Docker
|
|
||
|
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"]
|