Tiny WebServer Docker Image
293
This Docker image provides a compact and efficient web server designed for simple deployments, custom configurations, and optional HTTPS support. It offers out-of-the-box features such as automatic certificate generation, time zone configuration, and HTTP to HTTPS redirection—all managed via environment variables for maximum flexibility.
You can run the container in three different modes:
docker run -d --name testtinywebserver \
-e TIMEZONE=America/Havana \
-p 8080:80 \
-v $(pwd)/config:/config \
humbertovvaronafong/tiny-webserver
docker run -d --name testtinywebserver \
-e TIMEZONE=America/Havana \
-e REDIRECT_TO_HTTPS=yes \
-e AUTOCERT=yes \
-p 8443:443 \
-v $(pwd)/config:/config \
humbertovvaronafong/tiny-webserver
docker run -d --name testtinywebserver \
-e TIMEZONE=America/Havana \
-e REDIRECT_TO_HTTPS=yes \
-e AUTOCERT=no \
-p 8443:443 \
-v $(pwd)/config:/config \
humbertovvaronafong/tiny-webserver
You can also use Docker Compose to manage the container:
version: '3.8'
services:
tinywebserver:
image: humbertovvaronafong/tiny-webserver
container_name: testtinywebserver
ports:
- "8080:80"
- "8443:443"
environment:
- TIMEZONE=America/Havana
- REDIRECT_TO_HTTPS=yes
- AUTOCERT=yes
volumes:
- ./config:/config
restart: unless-stopped
Start the service:
docker-compose up -d
Use your browser to access the server:
http://192.168.1.4:8080/
https://192.168.1.4:8443/
To inspect the container's health status:
docker inspect --format='{{json .State.Health}}' testtinywebserver | jq
To view the logs from the container:
docker logs testtinywebserver
| Variable | Description | Default Value |
|---|---|---|
TIMEZONE | Sets the system timezone inside the container. | UTC |
NGINX_WORKER_PROCESSES | Defines the number of worker processes for NGINX. | auto |
REDIRECT_TO_HTTPS | Enables HTTP to HTTPS redirection (yes or no). | no |
AUTOCERT | Enables automatic HTTPS certificates via Let's Encrypt (yes or no). | no |
CERT_WARN_DAYS | Days before certificate expiration to trigger a renewal or warning. | 30 |
Humberto Vinlay Varona-Fong 📧 [email protected]
This project is licensed under the Creative Commons Zero (CC0) license. You are free to use, modify, and distribute without restriction.
Varona-Fong, H. V. (2025). Tiny WebServer Docker Image (1.0). Zenodo. https://doi.org/10.5281/zenodo.15399437
Content type
Image
Digest
sha256:15e3c1566…
Size
31.1 MB
Last updated
over 1 year ago
docker pull humbertovvaronafong/tiny-webserver