-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make CLRIE builds possible on Alpine linux #450
Comments
CLRIE is already built on Alpine using an image built from the following Docker file: https://github.com/microsoft/CLRInstrumentationEngine/blob/main/src/unix/docker/dockerfiles/build/alpine/Dockerfile |
I tried this locally recently, and I think that the base image that we are using for that docker file no longer exists. |
Yup, those were deleted. See dotnet/dotnet-docker#2848 We just need to choose an appropriate base image from https://mcr.microsoft.com/v2/dotnet-buildtools/prereqs/tags/list, but probably something that is still maintained from this manifest: https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/manifest.json Or we can build our own with minimal dependencies and not have to use an arbitrary base image from the dotnet-buildtools/prereqs repo. |
Great. Can you publish a spec for the Dockerfile that you end up defining? |
Is that base image arbitrary? I think it was just based on the version of alpine that we were trying to support a couple of years back. Probably time to update since it seems that the clr is no longer supporting it. Will we have to update our PAL as well? When you say that we could build our own, do you mean, "build our own and put it on a public feed"? We still use a pre-built image for our internal builds. |
Any alternatives to https://proddiagbuild.azurecr.io/v2/clrie-build-alpine/manifests/latest?
Also
|
At the time, it was not arbitrary. It was probably whatever dotnet was using to build their musl binaries at that time. But that image is probably long out of support and no longer used. From what I can tell, it doesn't exist in https://mcr.microsoft.com/v2/dotnet-buildtools/prereqs/tags/list in some equivalent manner.
I would say that we create Dockerfiles that are checked into the repo that use publicly available packages and images. Everyone can then use those Dockerfiles and build the images as they see fit. We can probably use the images produced from dotnet/dotnet-docker as our base images and build on top of those. |
I think that that base image was publicly available but has just been deleted. According to this blog post: https://techcommunity.microsoft.com/t5/azure-developer-community-blog/deprecating-the-distribution-of-microsoft-container-images-via/ba-p/2366861, the dotnet team is deprecating the use of the base images from dockerhub, though. The Microsoft Container Registry should be used instead. @sanikolov, you should be able to use that Dockerfile almost as-is to build on alpine. You will just have to change the base image at the top. This page: https://github.com/dotnet/dotnet-buildtools-prereqs-docker tells you what images are available to build with. We can probably just replace the base image at the top with this: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.6-3e800f1-20190506161422 |
hmm still getting errors, unrelated to the image
Also
|
ping, plz post an update here if you have one |
@WilliamXieMSFT |
There is a docker file for building on alpine. It can be found in /src/unix/docker/dockerfiles/. I just used this command to build a local image: cat /mnt/e/dd/CLRInstrumentationEngine/src/unix/docker/dockerfiles/alpine/Dockerfile | sudo docker build -t 'alpineclrie' -f - '/mnt/e/dd/CLRInstrumentationEngine (Note, the docker context is needed in order to pull in all of the additional prerequisites that we need). From there, you should be able to create a container. Note, our build scripts are picky about where the clrie source lives. Mount your CLRIE repository root to /root/ClrInstrumentationEngine when creating the container. I have not run a build on it yet, so I don't know if it will work. Good luck. |
Thanks. Unfortunately I get
|
I think your branch is out of date. The Dockerfile at https://github.com/microsoft/CLRInstrumentationEngine/blob/main/src/unix/docker/dockerfiles/build/alpine/Dockerfile uses |
@sanikolov Looks like you are running on Windows with docker? I was able to get a musl build using this powershell command. Note: I am doing this in a box with WSL ubuntu + docker installed. .\DockerLocalBuild.ps1 -CLib musl -BuildDockerImage -RebuildImage -Wsl |
Thank you both. |
This is a market driven requirement.
The following odd image + clang combination may prove useful to get you there quicker.
The text was updated successfully, but these errors were encountered: