Last active
January 14, 2022 10:45
-
-
Save dmitrydyomin/d9a94a43e3f22e269128f1f898f324d6 to your computer and use it in GitHub Desktop.
Build Imgproxy for Linux using Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
TAG=imgproxy-builder | |
docker build -t $TAG - << EOF | |
FROM golang:latest | |
RUN apt update && apt install -y libvips-dev | |
WORKDIR /src | |
RUN git clone https://github.com/imgproxy/imgproxy.git | |
WORKDIR /src/imgproxy | |
ENV CGO_LDFLAGS_ALLOW="-s|-w" | |
EOF | |
docker run --rm -v $(pwd)/output:/src/imgproxy/output $TAG go build -o output/imgproxy | |
docker rmi --no-prune $TAG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment