mirror of
https://github.com/willnorris/imageproxy.git
synced 2024-12-16 21:56:43 -05:00
a6f541de1b
Fixes #345
22 lines
494 B
Docker
22 lines
494 B
Docker
# syntax=docker/dockerfile:1.4
|
|
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/go:latest as build
|
|
LABEL maintainer="Will Norris <will@willnorris.com>"
|
|
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -v ./cmd/imageproxy
|
|
|
|
FROM cgr.dev/chainguard/static:latest
|
|
|
|
COPY --from=build /app/imageproxy /app/imageproxy
|
|
|
|
CMD ["-addr", "0.0.0.0:8080"]
|
|
ENTRYPOINT ["/app/imageproxy"]
|
|
|
|
EXPOSE 8080
|