5. Docker Setup¶
You can find the offical Docker Version of LinkStack here.
The docker version of LinkStack retains all the features and customization options of the original version.
This docker is based on Alpine Linux, a Linux distribution designed to be small, simple and secure. The web server is running Apache2, a free and open-source cross-platform web server software. The docker comes with PHP 8.2 for high compatibility and performance.
5.1 Deployment¶
The Docker Image exposes HTTP on port 80 and HTTPS on Port 443. You can modify your deployment via the following optional environment variables
Variable | Function | default Value |
---|---|---|
SERVER_ADMIN | The admin's email address | you@example.com |
HTTP_SERVER_NAME | the http server name of apache2 | localhost |
HTTPS_SERVER_NAME | the https server name of apache2 | localhost |
LOG_LEVEL | The log level of apache2 | info |
TZ | The timezone | UTC |
PHP_MEMORY_LIMIT | The php memory-limit | 256M |
UPLOAD_MAX_FILESIZE | The upload-max-filesize of PHP | 8M |
5.1.1 Supported Architectures¶
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
5.1.2 Docker Run Deployment¶
docker volume create linkstack
docker run --detach \
--name linkstack \
--publish 80:80 \
--publish 443:443 \
--restart unless-stopped \
--mount source=linkstack,target=/htdocs \
linkstackorg/linkstack
customized:
docker run --detach \
--name linkstack \
--hostname linkstack \
--env HTTP_SERVER_NAME="www.example.xyz" \
--env HTTPS_SERVER_NAME="www.example.xyz" \
--env SERVER_ADMIN="admin@example.xyz" \
--env TZ="Europe/Berlin" \
--env PHP_MEMORY_LIMIT="512M" \
--env UPLOAD_MAX_FILESIZE="8M" \
--publish 80:80 \
--publish 443:443 \
--restart unless-stopped \
--mount source=linkstack,target=/htdocs \
linkstackorg/linkstack
5.1.3 Docker Compose Stack¶
version: '3'
services:
linkstack:
image: linkstackorg/linkstack:latest
environment:
- TZ=Europe/Berlin
- SERVER_ADMIN=admin@example.xyz
- HTTP_SERVER_NAME=www.example.xyz
- HTTPS_SERVER_NAME=www.example.xyz
- LOG_LEVEL=info
- PHP_MEMORY_LIMIT=512M
- UPLOAD_MAX_FILESIZE=16M
ports:
- "80:80"
- "443:443"
volumes:
- linkstack:/htdocs
restart: unless-stopped
volumes:
linkstack:
5.2 Docker Bind Mounts¶
It's also possible to run the image with Docker Bind Mounts instead of Docker Volumes. But you have to download the latest release of linkstack by yourself and place it in the mounted directory if you do that. Be sure to give the files the owner and group apache
with the uid 100 and gid 101.