2019-08-16 18:38:26 +02:00
|
|
|
# Shlink Docker image
|
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
[](https://github.com/shlinkio/shlink/actions?query=workflow%3A%22Build+docker+image%22)
|
|
|
|
[](https://hub.docker.com/r/shlinkio/shlink/)
|
2019-08-16 18:38:26 +02:00
|
|
|
|
|
|
|
This image provides an easy way to set up [shlink](https://shlink.io) on a container-based runtime.
|
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
It exposes a shlink instance served with [swoole](https://www.swoole.co.uk/), which can be linked to external databases to persist data.
|
2019-08-16 18:38:26 +02:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
The most basic way to run Shlink's docker image is by providing these mandatory env vars.
|
2019-08-16 18:38:26 +02:00
|
|
|
|
|
|
|
* `SHORT_DOMAIN_HOST`: The custom short domain used for this shlink instance. For example **doma.in**.
|
|
|
|
* `SHORT_DOMAIN_SCHEMA`: Either **http** or **https**.
|
2021-01-17 17:40:47 +01:00
|
|
|
* `GEOLITE_LICENSE_KEY`: Your GeoLite2 license key. [Learn more](https://shlink.io/documentation/geolite-license-key/) about this.
|
2019-08-16 18:38:26 +02:00
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
To run shlink on top of a local docker service, and using an internal SQLite database, do the following:
|
2020-04-12 18:39:28 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
docker run \
|
|
|
|
--name shlink \
|
|
|
|
-p 8080:8080 \
|
|
|
|
-e SHORT_DOMAIN_HOST=doma.in \
|
|
|
|
-e SHORT_DOMAIN_SCHEMA=https \
|
2020-04-29 19:24:18 +02:00
|
|
|
-e GEOLITE_LICENSE_KEY=kjh23ljkbndskj345 \
|
2019-12-07 09:31:46 +01:00
|
|
|
shlinkio/shlink:stable
|
2019-08-16 18:38:26 +02:00
|
|
|
```
|
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
## Full documentation
|
2019-08-16 18:38:26 +02:00
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
All the features supported by Shlink are also supported by the docker image.
|
2019-08-16 18:38:26 +02:00
|
|
|
|
2021-01-17 17:40:47 +01:00
|
|
|
If you want to learn more, visit the [full documentation](https://shlink.io/documentation/install-docker-image/).
|