A Docker image to run a Highcharts export server using node-export-server.
- Multi-architecture support (amd64, arm64)
- Runs as non-root user for security
- Persistent caching for improved performance
- Configurable worker pool for memory optimization
- Docker 20.10+
docker run -d \
--name highcharts-export \
-v highcharts-cache:/cache \
--cap-add=SYS_ADMIN \
-p 7801:7801 \
ghcr.io/interactive-studios/dockerized-highcharts-export-serverThe server is now available at http://localhost:7801.
services:
highcharts:
image: ghcr.io/interactive-studios/dockerized-highcharts-export-server
restart: unless-stopped
volumes:
- highcharts-cache:/cache
ports:
- 7801:7801
cap_add:
- SYS_ADMIN
environment:
- POOL_MIN_WORKERS=1
- POOL_MAX_WORKERS=4
volumes:
highcharts-cache:curl \
-H "Content-Type: application/json" \
-X POST \
-d '{"infile":{"title": {"text": "Steep Chart"}, "xAxis": {"categories": ["Jan", "Feb", "Mar"]}, "series": [{"data": [29.9, 71.5, 106.4]}]}}' \
localhost:7801 \
-o chart.pngSpecify the output format using the type parameter:
# PNG (default)
curl -X POST -H "Content-Type: application/json" \
-d '{"type": "png", "infile": {...}}' \
localhost:7801 -o chart.png
# SVG
curl -X POST -H "Content-Type: application/json" \
-d '{"type": "svg", "infile": {...}}' \
localhost:7801 -o chart.svg
# PDF
curl -X POST -H "Content-Type: application/json" \
-d '{"type": "pdf", "infile": {...}}' \
localhost:7801 -o chart.pdf| Variable | Default | Description |
|---|---|---|
POOL_MIN_WORKERS |
1 |
Minimum number of worker processes |
POOL_MAX_WORKERS |
4 |
Maximum number of worker processes |
HIGHCHARTS_CACHE_PATH |
../../../../cache |
Path to cache directory |
Adjust worker pool size based on your workload and available memory:
docker run -d \
-e POOL_MIN_WORKERS=2 \
-e POOL_MAX_WORKERS=8 \
-v highcharts-cache:/cache \
--cap-add=SYS_ADMIN \
-p 7801:7801 \
ghcr.io/interactive-studios/dockerized-highcharts-export-serverMemory guidelines:
- Each worker uses approximately 100-200 MB of memory
- For 1 GB available: use 2-4 workers
- For 2 GB available: use 4-8 workers
- For 4 GB+ available: use 8-16 workers
For production deployments, set resource limits:
services:
highcharts:
image: ghcr.io/interactive-studios/dockerized-highcharts-export-server
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 512M
# ... other settingsThe SYS_ADMIN capability is required for Chromium's sandboxing features. Without it, Chromium cannot create the necessary namespaces for process isolation.
For environments where SYS_ADMIN is not available, you can disable the sandbox (not recommended for production):
docker run -d \
-e PUPPETEER_ARGS="--no-sandbox --disable-setuid-sandbox" \
-v highcharts-cache:/cache \
-p 7801:7801 \
ghcr.io/interactive-studios/dockerized-highcharts-export-serverThe server runs as a non-root highcharts user inside the container for improved security.
- Ensure Docker has enough memory allocated (minimum 512 MB)
- Verify the
SYS_ADMINcapability is added - Check logs:
docker logs <container-id>
- Reduce
POOL_MAX_WORKERSvalue - Increase Docker memory limits
- Monitor memory usage:
docker stats <container-id>
- Increase
POOL_MIN_WORKERSto keep workers warm - Ensure the cache volume is mounted for persistent caching
- Check if the container has sufficient CPU resources
- Verify the cache volume has correct permissions
- The container runs as UID 1000 (highcharts user)
For full API documentation, see the node-export-server documentation.
Common request parameters:
| Parameter | Type | Description |
|---|---|---|
infile |
object | Highcharts configuration object |
type |
string | Output format: png, svg, pdf, jpeg |
width |
number | Output width in pixels |
scale |
number | Scale factor for the output |
constr |
string | Chart constructor: Chart, StockChart, MapChart, GanttChart |
This project is licensed under the MIT License. See the LICENSE file for details.
When running this image, you're automatically accepting the Highcharts license terms.