0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00
imageproxy/Dockerfile

23 lines
494 B
Text
Raw Normal View History

2022-11-14 14:18:09 -05:00
# syntax=docker/dockerfile:1.4
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/go:latest as build
LABEL maintainer="Will Norris <will@willnorris.com>"
2015-05-21 15:53:41 -05:00
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
2022-11-14 14:18:09 -05:00
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -v ./cmd/imageproxy
2022-11-14 14:18:09 -05:00
FROM cgr.dev/chainguard/static:latest
COPY --from=build /app/imageproxy /app/imageproxy
CMD ["-addr", "0.0.0.0:8080"]
ENTRYPOINT ["/app/imageproxy"]
2015-05-21 15:53:41 -05:00
EXPOSE 8080