Multi-architecture Docker image for OpenSCAD with comprehensive 3D modeling libraries, designed for automated rendering of 3D models in CI/CD pipelines.
# Pull the latest master branch image
docker pull gounthar/openscad:master
# Render an STL file from a SCAD file
docker run -v $(pwd):/workspace gounthar/openscad:master \
openscad -o /workspace/output.stl /workspace/input.scad
# Render a PNG preview image
docker run -v $(pwd):/workspace gounthar/openscad:master \
xvfb-run -a openscad --imgsize=1920,1080 \
-o /workspace/output.png /workspace/input.scad
linux/amd64 and linux/arm64Images are automatically built for each branch:
gounthar/openscad:master - Latest stable version from master branchgounthar/openscad:fosdem-2025 - FOSDEM 2025 event-specific buildsgounthar/openscad:<branch-name> - Any active development branchdocker run --rm \
-v $(pwd):/workspace \
gounthar/openscad:master \
openscad -o /workspace/model.stl /workspace/model.scad
docker run --rm \
-v $(pwd):/workspace \
gounthar/openscad:master \
xvfb-run -a openscad --imgsize=3840,2160 \
-o /workspace/preview.png /workspace/model.scad
docker run --rm \
-v $(pwd):/workspace \
gounthar/openscad:master \
bash -c 'for f in /workspace/*.scad; do \
timeout 300 openscad -o "${f}.stl" "$f"; \
done'
This image is used in GitHub Actions workflows for automated binary generation:
jobs:
render:
runs-on: ubuntu-latest
container:
image: gounthar/openscad:master
options: --user root # Required for git operations and file permissions in Actions
steps:
- uses: actions/checkout@v5
- name: Render models
run: |
find . -name "*.scad" -exec openscad -o {}.stl {} \;
Note on --user root: This is required in GitHub Actions when using actions/checkout because the action needs write permissions to the workspace. For standalone Docker usage without git operations, you can omit this option and run as the default openscad user for better security.
dockerfiles/DockerfilePNG rendering time scales exponentially with resolution:
--imgsize=1920,1080 for reasonable render timestimeout command to prevent infinite hangs$fn values in SCAD files (50-100 for production)DISPLAY: Set by Xvfb for headless renderingHOME: /home/openscadWORKSPACE: /workspace (recommended mount point)See the source repository for license information.
This image is actively maintained and automatically rebuilt on:
Last updated: 2025-10-28
Content type
Image
Digest
sha256:e76298d54…
Size
1 GB
Last updated
10 months ago
docker pull gounthar/openscad