A docker container for building and running FreeCAD

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
David_D
Posts: 81
Joined: Fri Jun 29, 2018 6:43 am
Location: Christchurch, New Zealand

A docker container for building and running FreeCAD

Post by David_D »

Hello.

I'm pretty lazy, so I didn't want to build FreeCAD within my workstation distro of choice, Solus. To be able to build it within Debian instead, with all it's many wonderful packages, I built a docker container.

I've put it on Gitlab, just in case someone else can find some use in it.

https://gitlab.com/daviddaish/freecad_docker_env
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Post by Kunda1 »

Cool. Can you build one that is Py3/Qt5 (incl. pyside2/shiboken2)
Running
OCC 7.3.0
Vtk 8.x
gmsh 4.1.x
etc...

Basically all the libs that we use in Conda
https://github.com/FreeCAD/FreeCAD_Conda
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
David_D
Posts: 81
Joined: Fri Jun 29, 2018 6:43 am
Location: Christchurch, New Zealand

Re: A docker container for building and running FreeCAD

Post by David_D »

Ah, interesting, I wasn't aware there were newer versions for all the dependencies. I'm looking into this now.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Post by Kunda1 »

David_D wrote: Fri Feb 08, 2019 8:28 am Ah, interesting, I wasn't aware there were newer versions for all the dependencies. I'm looking into this now.
Thanks for looking in to this.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Post by looo »

I tried to make something similar once, but this wasn't successful https://github.com/FreeCAD/FreeCAD_Cond ... Dockerfile. It would be nice to have a docker container including all the dependencies of freecad, an ide (like kdevelop), git, and the freecad source. Ideally everything should be compiled already (maybe in debug-mode).

So to get started with freecad development all one has to do is:

Code: Select all

docker run --name freecad-dev freecad/freecad-development
and this starts the ide.
This would be soooo useful.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Post by Kunda1 »

looo wrote: Fri Feb 08, 2019 5:20 pm This would be soooo useful.
good point. Created issue #3821 to track this.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
David_D
Posts: 81
Joined: Fri Jun 29, 2018 6:43 am
Location: Christchurch, New Zealand

Re: A docker container for building and running FreeCAD

Post by David_D »

Blimey, I am having some real difficulties getting the pivy build script to work. I have a horrible feeling I'll need to do development on it. God help me.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Post by looo »

David_D wrote: Fri Feb 15, 2019 12:07 am Blimey, I am having some real difficulties getting the pivy build script to work. I have a horrible feeling I'll need to do development on it. God help me.
Which way you want to install it? Which version of coin do you use?
User avatar
David_D
Posts: 81
Joined: Fri Jun 29, 2018 6:43 am
Location: Christchurch, New Zealand

Re: A docker container for building and running FreeCAD

Post by David_D »

looo wrote: Fri Feb 15, 2019 4:25 pm Which way you want to install it? Which version of coin do you use?
I'd be happy with any way to install it. I've been trying to get the setup.py script to work, to no avail. I've had an issue with Swig not being given the correct -I flags, the setup script not finding the qmake binary, and a bizzare issue with CMake concatenating things without prompting. All of these issues I've managed to resolve with some majorly hacky workarounds, and now the only issue I'm dealing with now (unless a new one pops up) is that Swig can't handle the #include_next preproccessor directive correctly.

If there's an alternative way to build and install it, I'm all ears.

I've been using Coin v3.1.3
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Post by looo »

Coin3d has updated to cmake. Therefore I had to find a way to retrieve information of coin via cmake.
If you still have a coin version compiled with autotools, select the setup_old.py to build pivy.

If you have any suggestions how to improve the scripts please report them.
Post Reply