Docker
imgproxy can (and this is highly recommended) be used as a standalone application inside a Docker container. Just pull the official image from Docker Hub:
[code]docker pull darthsim/imgproxy:latest
docker run -p 8080:8080 -it darthsim/imgproxy[/code]
You can also build your own image. imgproxy is ready to be dockerized out of the box:
[code]docker build -f docker/Dockerfile -t imgproxy .
docker run -p 8080:8080 -it imgproxy[/code]
Helm
imgproxy can be easily deployed to your Kubernetes cluster using Helm and our official Helm chart:
[code]helm repo add imgproxy https://helm.imgproxy.net/[/code]
# With Helm 3
[code]helm upgrade -i imgproxy imgproxy/imgproxy[/code]
# With Helm 2
[code]helm upgrade -i –name imgproxy imgproxy/imgproxy[/code]
Check out the chart’s README for more info.
**Clouds
Heroku**
imgproxy can be deployed to Heroku with the click of a button:
Deploy
That being said, you can also do it manually in just a few steps:
[code]git clone https://github.com/imgproxy/imgproxy.git && cd imgproxy
heroku create your-application
heroku stack:set container
git push heroku master[/code]
If you want to deploy a specific version of imgproxy or imgproxy Pro, you can use Heroku Container Registry:
heroku create your-application
heroku stack:set container -a your-application
heroku container:login
Replace “v3” with the imgproxy version you want to deploy
docker pull darthsim/imgproxy:v3-amd64
docker tag darthsim/imgproxy:v3-amd64 registry.heroku.com/your-application/web
docker push registry.heroku.com/your-application/web
heroku container:release your-application -a your-application
WARNING
Take a note that the example is using a tag suffixed with -amd64 when pulling imgproxy Docker image. This suffix ensures that docker pull will download an image built for the AMD64 CPU architecture which is used by Heroku.
If the machine where you’re running these commands uses an ARM64 CPU (such as Apple Silicone ones) and you don’t use the -amd64 suffix, docker pull will download an image built for the ARM64 CPU architecture, and it won’t be able to launch on Heroku.
Dome
imgproxy can be deployed to Dome with the click of a button:
Deploy to Dome
Packages
Arch Linux and derivatives
imgproxy package is available from AUR.
macOS + Homebrew
imgproxy is available from Homebrew:
brew install imgproxy
From the source
You can get the imgproxy source code by cloning the GitHub repo:
git clone https://github.com/imgproxy/imgproxy.git
cd imgproxy
…or by downloading the source tarball:
mkdir imgproxy
cd imgproxy
curl -Ls https://github.com/imgproxy/imgproxy/archive/master.tar.gz \
| tar -xz –strip-components 1 -C .
You can also download a specific version:
mkdir imgproxy
cd imgproxy
curl -Ls https://github.com/imgproxy/imgproxy/archive/v3.20.0.tar.gz \
| tar -xz –strip-components 1 -C .
Ubuntu
First, install libvips.
The Ubuntu apt repository contains a pretty old version of libvips. You can use PPA to access a more recent version of libvips:
sudo add-apt-repository ppa:dhor/myway
sudo apt-get update
sudo apt-get install libvips-dev
But if you want to use all the features of imgproxy, it’s recommended to build libvips from the source: https://github.com/libvips/ libvips/wiki/Build-for-Ubuntu
Next, install the latest version of Go.
And finally, install imgproxy itself:
CGO_LDFLAGS_ALLOW=”-s|-w” \
go build -o /usr/local/bin/imgproxy
macOS + Homebrew
brew install vips go
PKG_CONFIG_PATH=”$(brew –prefix libffi)/lib/pkgconfig” \
CGO_LDFLAGS_ALLOW=”-s|-w” \
CGO_CFLAGS_ALLOW=”-Xpreprocessor” \
go build -o /usr/local/bin/imgproxy
留言