This is a docker container intended to act as a build and run environment for FreeCAD.
It is based on daviddaish/freecad_docker_env
The directories containing FreeCAD's source code and build are not included inside the docker image. Instead, they are attached to the docker container when you run the container. This allows the built code to have continuity across different docker containers, reducing the time for a build to occur, and allowing you to use your own editor/IDE outside of the container.
The docker is not deployed and therefore you need to build it locally
You must edit the run_docker.sh to set the correct path to the SOURCE_DIR
, BUILD_DIR
and CONF_DIR
. Then you can execute run_docker.sh
:
?> ./run_docker.sh
Once the docker container has been created, you should have access to a command prompt that allows you to build your version of FreeCAD.
docker> /root/build_freecad.sh
Once you have build FreeCAD you can execute it with:
docker> /mnt/build/bin/FreeCAD
For mac users:
In order to use the GUI, you must install XQuartz.
Then, open XQuartz with
open -a XQuartz
, and ensure "Allow connections from within network clients" is ticked, under the "Security" tab. This process was taken from this blogpost.
You will be able to find the mounted directories within the container in the
/mnt
directory, named /mnt/source
, /mnt/build
, and /mnt/files
.
REF: Python workbenches debugging
- Start winpdb
docker> winpdb
- Start FreeCAD
docker> /mnt/build/bin/FreeCAD --console --verbose /mnt/files/git/opensource/FreeCAD/src/Mod/BIM/Resources/importers/debug_importSH3D.py
Building the docker image might take several hours (depending on your connection).
docker build -t registry.gitlab.com/daviddaish/freecad_docker_env:latest .
Note that, because of the size of the dependancies, docker may throw a no space left on device
error part way through the build. To reduce the likelyhood of this, ensure you have around 25GB
of space on your storage. You can also run docker system prune
to free up space.
Prior to pushing, the image must be able to reliabily build the most recent
tags of the FreeCAD source code: master
, 0.19_pre
, and 0.18.4
.
docker login registry.gitlab.com
docker push registry.gitlab.com/daviddaish/freecad_docker_env:updates