A lightweight Docker image for running Tinyproxy — a fast, minimal HTTP/HTTPS proxy server.
Pull the prebuilt image from GitHub Container Registry and run it:
docker pull ghcr.io/niklasthorild/tinyproxy-docker:latest
docker run -d --name tinyproxy -p 8888:8888 -e TZ=UTC ghcr.io/niklasthorild/tinyproxy-docker:latestSet your app/system proxy to http://localhost:8888.
Mount your own tinyproxy.conf into the container:
docker run -d --name tinyproxy \
-p 8888:8888 \
-e TZ=UTC \
-v "$(pwd)/tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf:ro" \
ghcr.io/niklasthorild/tinyproxy-docker:latestCommon options in tinyproxy.conf:
Port 8888— internal proxy port (must match your container port mapping)Allow 127.0.0.1orAllow 10.0.0.0/8— restrict accessBasicAuth <user> <password>— simple auth (optional)
services:
tinyproxy:
image: ghcr.io/niklasthorild/tinyproxy-docker:latest
container_name: tinyproxy
ports:
- "8888:8888"
environment:
- TZ=UTC
volumes:
- ./tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf:ro
restart: unless-stoppedStart it:
docker compose up -dThis image is built with container security best practices in mind and supports strict hardening features:
- The container runs as a non-privileged user by default
- Fully compatible with Docker's --user flag to specify exact UID/GID mappings
- Can safely run with the --read-only=true flag to prevent tampering
- Compatible with the --security-opt=no-new-privileges:true security option
- Requires no special Linux capabilities and runs smoothly with --cap-drop=ALL
- CI automatically re-builds the image weekly to make sure the latest security patches are applied
Hardened docker compose example:
services:
tinyproxy:
image: ghcr.io/niklasthorild/tinyproxy-docker:latest
container_name: tinyproxy
ports:
- "8888:8888"
environment:
- TZ=UTC
volumes:
- ./tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf:ro
restart: unless-stopped
# Security Hardening
user: 1000:1000
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL# Should return your outbound IP via the proxy
curl -x http://localhost:8888 https://ifconfig.medocker logs -f tinyproxy # tail logs
docker stop tinyproxy # stop
docker rm tinyproxy # remove