Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

error in docker build #110

Open xiefeihua opened 2 years ago

xiefeihua commented 2 years ago

i was install via docker build in windows10

docker build -t cura -f .\docker\windows\Dockerfile-base.vs2015 .

but failure: `Failures

Ghostkeeper commented 2 years ago

What does the log say?

evtrados commented 2 years ago

Hi @xiefeihua,

We have updated the Windows docker flow, so please try it once more using: docker build -t <your_tag> -f .\docker\windows\Dockerfile-build.vs2019 .

We have now separated the image generation to create a base image (it installs Visual Studio, mingw, choco, etc), which is used as the basis of the image you will build, so initially docker will pull that image to run everything inside of it and create the environment. However (and this is a big however), the problem on Windows is that your host system should be of the same version as your container. We use a Windows Server 2019 VM for our builds, which has a Windows OS version of 1809. So, if you are using a more recent OS version (which I suppose you are) then this will not work for you. Some more information taken from Microsoft's official docker image documentation: "Windows requires the host OS version to match the container OS version. If you want to run a container based on a newer Windows build, make sure you have an equivalent host build. Otherwise, you can use Hyper-V isolation to run older containers on new host builds."

In any case, please try it out if you want. But if you receive errors that "the cl.exe compiler cannot compile a single program" or relevant then that would be the reason behind that error.