darthsim/imgproxy-base
Base Docker image with the latest imgproxy dependencies
10K+
Base Docker image with the latest imgproxy dependencies. Ideal for imgproxy development and building its Docker images.
Run this image with your development directory mounted:
docker run --rm -it \
-p 8080:8080 \
-v $(pwd):/app \
--name imgproxy_dev \
darthsim/imgproxy-base:latest
...and build your imgproxy as usual:
go build
If you don't care about the size, you can just build your Docker image on top of this one:
FROM darthsim/imgproxy-base:latest
COPY . .
RUN go build -v -o /usr/local/bin/imgproxy
CMD ["imgproxy"]
EXPOSE 8080
But you probably want to use multistage build to minimize the final image, and it's a bit tricky. You need to take care of the following:
/usr/local/lib
.Here is the working example:
FROM darthsim/imgproxy-base:latest
COPY . .
RUN go build -v -o /usr/local/bin/imgproxy
# ==================================================================================================
# Final image
FROM debian:buster-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bash \
ca-certificates \
libsm6 \
liblzma5 \
libzstd1 \
&& rm -rf /var/lib/apt/lists/*
COPY --from=0 /usr/local/bin/imgproxy /usr/local/bin/
COPY --from=0 /usr/local/lib /usr/local/lib
ENV LD_LIBRARY_PATH /usr/local/lib
CMD ["imgproxy"]
EXPOSE 8080
Sergey "DarthSim" Alexandrovich
imgproxy-base is licensed under the MIT license.
See LICENSE for the full license text.
docker pull darthsim/imgproxy-base