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

29 lines
607 B
Text
Raw Normal View History

2020-02-02 13:27:02 -05:00
FROM golang:1.13 as build
MAINTAINER Will Norris <will@willnorris.com>
2015-05-21 15:53:41 -05:00
RUN useradd -u 1001 go
WORKDIR /app
2015-05-21 15:53:41 -05:00
COPY go.mod go.sum ./
2019-06-09 16:55:19 -05:00
COPY third_party/envy/go.mod ./third_party/envy/
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v ./cmd/imageproxy
FROM scratch
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /app/imageproxy /app/imageproxy
USER go
CMD ["-addr", "0.0.0.0:8080"]
ENTRYPOINT ["/app/imageproxy"]
2015-05-21 15:53:41 -05:00
EXPOSE 8080