2021-11-23 13:18:53 +02:00
|
|
|
ARG BASE_IMAGE_VERSION="v3.0.1"
|
2020-03-12 16:03:29 +02:00
|
|
|
|
2020-06-16 15:48:19 +02:00
|
|
|
FROM darthsim/imgproxy-base:${BASE_IMAGE_VERSION}
|
|
|
|
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
2018-11-08 12:34:21 +02:00
|
|
|
|
2019-11-26 16:56:21 +02:00
|
|
|
COPY . .
|
|
|
|
RUN go build -v -o /usr/local/bin/imgproxy
|
2018-11-08 12:34:21 +02:00
|
|
|
|
|
|
|
# ==================================================================================================
|
|
|
|
# Final image
|
2017-07-01 07:59:10 +02:00
|
|
|
|
2021-06-16 15:33:45 +02:00
|
|
|
FROM debian:bullseye-slim
|
2018-10-25 18:25:54 +02:00
|
|
|
LABEL maintainer="Sergey Alexandrovich <darthsim@gmail.com>"
|
2018-10-25 16:28:17 +02:00
|
|
|
|
2019-11-26 16:56:21 +02:00
|
|
|
RUN apt-get update \
|
2021-09-30 16:20:47 +02:00
|
|
|
&& apt-get upgrade -y \
|
2019-11-26 16:56:21 +02:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2019-10-02 14:49:05 +02:00
|
|
|
bash \
|
|
|
|
ca-certificates \
|
2019-11-26 16:56:21 +02:00
|
|
|
libsm6 \
|
2020-03-12 16:03:29 +02:00
|
|
|
liblzma5 \
|
2020-03-13 13:38:12 +02:00
|
|
|
libzstd1 \
|
2021-11-22 20:07:41 +02:00
|
|
|
libpcre3 \
|
2019-11-26 16:56:21 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2018-10-25 16:28:17 +02:00
|
|
|
|
2018-11-08 12:34:21 +02:00
|
|
|
COPY --from=0 /usr/local/bin/imgproxy /usr/local/bin/
|
2019-11-26 16:56:21 +02:00
|
|
|
COPY --from=0 /usr/local/lib /usr/local/lib
|
2020-06-16 15:48:19 +02:00
|
|
|
|
|
|
|
COPY NOTICE /usr/local/share/doc/imgproxy/
|
2018-10-25 16:28:17 +02:00
|
|
|
|
2019-03-21 14:47:17 +02:00
|
|
|
ENV VIPS_WARNING=0
|
2020-01-09 14:19:43 +02:00
|
|
|
ENV MALLOC_ARENA_MAX=2
|
2020-06-16 15:48:19 +02:00
|
|
|
ENV LD_LIBRARY_PATH /usr/local/lib
|
2019-03-21 14:47:17 +02:00
|
|
|
|
2021-11-25 15:35:56 +02:00
|
|
|
RUN groupadd -r imgproxy && useradd -r -u 999 -g imgproxy imgproxy
|
|
|
|
USER 999
|
2021-11-24 11:41:57 +02:00
|
|
|
|
2017-07-01 07:59:10 +02:00
|
|
|
CMD ["imgproxy"]
|
|
|
|
|
|
|
|
EXPOSE 8080
|