Close

Step 1: Docker Image

A project log for My Adventure to Compile Cura From Source

An attempt to compile Cura to be able to contribute solving a slicer engine issue that has been present for many years.

timo-birnscheinTimo Birnschein 02/20/2022 at 16:590 Comments

Disclaimer: I have never used Docker. I suppose this is my chance to start and understand what this is even for. I currently believe it's some sort of (virtual) environment that is supposed to contain all software (and versions) to build a specific thing without compromising anything else in the system. i.e. a container. It contains the mess inside. Let's hope that's true.

So let's start here:

https://github.com/Ultimaker/cura-build-environment

Install cmake: https://cmake.org/download/

Install git: https://gitforwindows.org/

Install svn: https://tortoisesvn.net/downloads.html

Ah, it already fails at Docker. What a surprise. The installation manual doesn't mention that Docker is even needed and brushes straight over it and starts using command line docker with no comment. Let's figure out how to get docker to work in the command line...

Install: https://hub.docker.com/editions/community/docker-ce-desktop-windows/

Docker requires support for hardware virtualization to which must be activated in the bios. Apparently, it's an entire virtual machine, seemingly to run Linux on Windows.

Then it complains about kernel updates which must be installed manually to enable Linux on Windows.

Install update package listed under step 4: https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

When they try to annoy you:

This is literally the first step in the tutorial with no commands entered. Sometimes, I hate people. Moving on...

The second problem I encountered was running out of space on C:\ and then rerunning the command just results in a not automatically solvable problem:

Like any apt-get install name_your_tool will simply retry and properly install whatever is needed on the second attempt. Here is just breaks. Since I'm inexperienced, I needed to google how this can be solved. To be fair, this might actually be Windows locking out certain functions when the drive is full and not releasing those functions when space was made available. 

Rebooting solves this. I suppose I could have tried killing docker-desktop as well.

Now start powershell or docker-desktop and run: docker pull ultimaker/cura-build-environment

docker pull ultimaker/cura-build-environment

This time it should complete and we end up with some sort of docker thing we need to build the build tools to build Cura. Moving on.

I started the docker in docker-desktop by clicking run, changing nothing, and then going straight to the CLI:

I was being presented with a barely usable shell running a linux called CentOS. I set the CURA_BUILD_ENV_BUILD_TYPE to release as seen in the screenshot above because - in contrast to the documentation, wasn't set by default. Glad I checked.

Unfortunately, the story ends here as the documentation for the rest of the steps doesn't work.

Trying further:

I realized after a quick nap that I didn't actually checkout the cura build environment git. Wasn't in the readme, right? So I pull that and run the command in my PowerShell:

docker build -t cura_timo -f docker/windows/Dockerfile.vs2015 .

 But that also fails as the docker image doesn't appear to have the proper files installed:

Discussions