Skip to content

openscad/docker-openscad

Repository files navigation

docker-openscad

This repository collects OpenSCAD related docker files. One is meant for running OpenSCAD in a container (for building models, etc.), while the rest are meant for internal use in the OpenSCAD CI automation.

General Use

For general use (running OpenSCAD in a container), please use the openscad/openscad images published and documented at Docker Hub.

Rendering to a STL/3MF Model

docker run \
    -it \
    --rm \
    -v $(pwd):/openscad \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    openscad/openscad:latest \
    openscad -o CSG.3mf CSG.scad

Rendering a PNG

docker run \
    -it \
    --rm \
    --init \
    -v $(pwd):/openscad \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    openscad/openscad:latest \
    xvfb-run -a openscad -o CSG.png CSG.scad

Note that PNG renderings currently still needs the X display. That limitation can go away soon due to the built-in EGL support. So this needs --init and run via xvfb-run.

CI support, for internal use

  • openscad/appimage-*
  • openscad/mxe-*
  • openscad/src-*

All docker images can be viewed with a Docker Hub search for openscad/.

Debug Builds

Creating an image with debug symbols depends if the app is compiled with cmake or qmake. To enable debugging set BUILD_TYPE="Debug" and DEBUG="+" in `scripts/build-images.sh

Before

--build-arg BUILD_TYPE="Release" \
--build-arg DEBUG="-" \

After

--build-arg BUILD_TYPE="Debug" \
--build-arg DEBUG="+" \

Example to run gdb in a container

docker run --ulimit core=-1 -it -v $(pwd):/input openscad/openscad:2021.01-debug
apt update; apt install gdb -y
xvfb-run gdb --ex run --args openscad --info

About

OpenSCAD-related docker files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published