2018-10-04 14:59:57 +02:00
# Installation
There are three ways you can install imgproxy:
### Docker
imgproxy can (and should) be used as a standalone application inside a Docker container. Just pull the official image from Docker Hub:
```bash
$ docker pull darthsim/imgproxy:latest
$ docker run -p 8080:8080 -it darthsim/imgproxy
```
2018-10-08 08:23:20 +02:00
You can also build your own image. imgproxy is ready to be dockerized, plug and play:
2018-10-04 14:59:57 +02:00
```bash
$ docker build -t imgproxy .
$ docker run -p 8080:8080 -it imgproxy
```
### Heroku
2018-10-08 08:23:20 +02:00
imgproxy can be deployed to Heroku with a click of a button:
2018-10-04 14:59:57 +02:00
2018-10-29 18:21:04 +02:00
[![Deploy ](https://www.herokucdn.com/deploy/button.svg )](https://heroku.com/deploy?template=https://github.com/DarthSim/imgproxy)
2018-10-04 14:59:57 +02:00
However, you can do it manually with a few steps:
```bash
$ git clone https://github.com/DarthSim/imgproxy.git & & cd imgproxy
$ heroku create your-application
$ heroku stack:set container
$ git push heroku master
```
### From the source
1. First, install [libvips ](https://github.com/libvips/libvips ).
```bash
# macOS
$ brew install vips
# Ubuntu
# Ubuntu apt repository contains a pretty old version of libvips.
# It's recommended to use PPA with an up to date version.
$ sudo add-apt-repository ppa:dhor/myway
$ sudo apt-get install libvips-dev
2019-04-11 16:31:15 +02:00
2018-12-02 11:33:18 +02:00
# FreeBSD
2019-05-07 11:03:06 +02:00
$ pkg install -y pkgconf vips
2018-10-04 14:59:57 +02:00
```
2. Next, install imgproxy itself:
```bash
2019-05-07 11:03:06 +02:00
$ CGO_LDFLAGS_ALLOW="-s|-w" go get -f -u github.com/DarthSim/imgproxy
2018-10-04 14:59:57 +02:00
```
2019-04-11 16:31:15 +02:00
**Note:** imgproxy build is automatically tested with the latest three minor versions of Go and libvips. Successfully build with the older versions is not guaranteed but yet may be possible.