2022-11-14 14:18:09 -05:00
|
|
|
# syntax=docker/dockerfile:1.4
|
2023-08-02 10:42:28 -05:00
|
|
|
FROM --platform=$BUILDPLATFORM cgr.dev/chainguard/wolfi-base as build
|
2020-09-09 17:41:34 -05:00
|
|
|
LABEL maintainer="Will Norris <will@willnorris.com>"
|
2015-05-21 15:53:41 -05:00
|
|
|
|
2024-05-08 23:15:03 -05:00
|
|
|
RUN apk update && apk add build-base git openssh go-1.21
|
2023-08-02 10:42:28 -05:00
|
|
|
|
2019-03-22 02:31:42 -05:00
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
2017-09-10 12:00:23 -05:00
|
|
|
|
2019-03-22 02:31:42 -05:00
|
|
|
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
|
2017-09-10 12:00:23 -05:00
|
|
|
|
2022-11-14 14:18:09 -05:00
|
|
|
FROM cgr.dev/chainguard/static:latest
|
2017-09-10 12:00:23 -05:00
|
|
|
|
2019-03-22 02:31:42 -05:00
|
|
|
COPY --from=build /app/imageproxy /app/imageproxy
|
2017-09-10 12:00:23 -05:00
|
|
|
|
|
|
|
CMD ["-addr", "0.0.0.0:8080"]
|
2019-03-22 02:31:42 -05:00
|
|
|
ENTRYPOINT ["/app/imageproxy"]
|
2015-05-21 15:53:41 -05:00
|
|
|
|
|
|
|
EXPOSE 8080
|