2023-04-06 21:05:59 +08:00
|
|
|
FROM golang:1.20.3-alpine3.17 as go
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
vips-dev \
|
|
|
|
build-base; \
|
|
|
|
go install github.com/h2non/imaginary@master # use master branch as base
|
2022-08-25 21:06:23 +08:00
|
|
|
|
2023-04-06 21:05:59 +08:00
|
|
|
FROM alpine:3.17.3
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
tzdata \
|
|
|
|
ca-certificates \
|
|
|
|
netcat-openbsd \
|
|
|
|
vips-dev
|
2022-08-25 21:06:23 +08:00
|
|
|
|
2023-04-06 21:05:59 +08:00
|
|
|
COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
2023-03-08 18:08:03 +08:00
|
|
|
|
|
|
|
# https://github.com/h2non/imaginary#memory-issues
|
|
|
|
ENV MALLOC_ARENA_MAX=2
|
2023-04-06 21:05:59 +08:00
|
|
|
ENTRYPOINT ["imaginary", "-return-size", "-max-allowed-resolution", "222.2"]
|
|
|
|
|
|
|
|
HEALTHCHECK CMD nc -z localhost 9000 || exit 1
|
|
|
|
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|