Ticket #3821 - Docker env build container, now with FEM!
Ticket #3821 - Docker env build container, now with FEM!
Hello, around a year ago, I created a docker container to make building FreeCAD for development purposes faster and easier. For those that are interested, it can now also build the FEM module. It includes all the latest versions of FreeCAD's dependencies, built from source, like Python 3.7, QT5.13, OCC 7.4, etc.
You can find it here: https://gitlab.com/daviddaish/freecad_docker_env
Somewhat related: I was wondering if it would be ok to document the existence of the docker container somewhere on the wiki's unix build instructions. I wouldn't want to make such a big change without the blessing of the veterans.
You can find it here: https://gitlab.com/daviddaish/freecad_docker_env
Somewhat related: I was wondering if it would be ok to document the existence of the docker container somewhere on the wiki's unix build instructions. I wouldn't want to make such a big change without the blessing of the veterans.
Re: Docker env build container, now with FEM!
Whoopsie. Found a build failing error that only occurs every now and again. Will fix this asap.
Re: Docker env build container, now with FEM!
Oh yea, I remember there is a ticket open for this on the tracker...lemme see if I can find it.
Edit: found it:
issue #3821
Edit: found it:
issue #3821
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
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
Re: Ticket #3821 - Docker env build container, now with FEM!
Ok, I have resolved the build issues. My apologies for the delay. The docker image takes the better part of a day to build from scratch, so it takes a long time to iterate and diagnose problems.
I believe it now works satisfactorily.
Assuming it's up to community standards, would it be alright to add this to the wiki, and close that ticket?
I believe it now works satisfactorily.
Assuming it's up to community standards, would it be alright to add this to the wiki, and close that ticket?
Re: Ticket #3821 - Docker env build container, now with FEM!
Awesome. Thanks for all your work. We need some folks to test this and vet before we add to the wiki. Can you write a little more about how this could be useful for a developer's workflow?
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
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
Re: Ticket #3821 - Docker env build container, now with FEM!
Absolutely. The main value that the docker image offers is dependency and build environment management.
- All of FreeCAD's dependencies are already installed, compatible with each other, and configured appropriately, allowing you to get started developing very quickly.
- They are contained within the docker container, preventing any unwanted packages contaminating your workstation, and preventing any clashing versions.
- The source code and build directories are outside the docker container. This allows you to use your preferred editors, versioning systems, dev tools etc, without having to set them up in the docker container. You can just use them as normal, right from your workstation. (Also, it means you don't have to rebuild the docker container each time you want to build FreeCAD.)
- For those using obscure *nix distros and instructions are not available for fetching dependencies, all you need to install on your workstation is docker, which is quite commonly available across many distributions.
- It provides a static, immutable development environment. I personally find this useful when developing to reduce the number of potential variables that could be causing an issue. You know you've not altered something esoteric in the environment between builds. For developers collaborating, and both using the same docker container, you can be sure you're both working from the same environment, which reduces communication errors caused by differences in environment.
- kkremitzki
- Veteran
- Posts: 2447
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Ticket #3821 - Docker env build container, now with FEM!
I've been wanting for us to maintain official Docker images. I can help with this. Please make PRs against https://github.com/freecad/docker and we can get started.
Re: Ticket #3821 - Docker env build container, now with FEM!
Sounds reasonable, as much as it pains me to use a Microsoft product.kkremitzki wrote: ↑Mon Feb 10, 2020 5:42 am I've been wanting for us to maintain official Docker images. I can help with this. Please make PRs against https://github.com/freecad/docker and we can get started.
It appears I cannot create a pull request on account of the repo being empty. Could you please initialise it with a readme, or some such?
- kkremitzki
- Veteran
- Posts: 2447
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Re: Ticket #3821 - Docker env build container, now with FEM!
Sure, just did so.
Re: Ticket #3821 - Docker env build container, now with FEM!
Great, I've made the pull request. If you'd like to get the commit history of the original repo, you'd probably want to delete this github repo, and clone the gitlab repo. I don't particularly care either way.
In other news, the docker images were hosted on gitlab, so if it's moving from there, there needs to be an appropriate way to host the images. Docker hub would work fine, but I'm not certain how FreeCAD manages permissions and what not.
That's putting the cart before the horse, however, because the current image should be vetted before anything along those lines happens. Does it work acceptably for you?