1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-23 11:14:48 +02:00
imgproxy/docker/Dockerfile

43 lines
939 B
Docker
Raw Normal View History

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