Skip to content
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

Update Android Dockerfile to install Docker #646

Merged

Conversation

simonrozsival
Copy link
Member

We need to be able to build a Docker image during the Android build process so that we can run a gRPC testing server (see dotnet/runtime#73060).

cc @directhex

@mthalman
Copy link
Member

mthalman commented Aug 1, 2022

How are containers from this image intended to be created?

This is a docker-in-docker scenario which requires specific configuration to work properly. It either needs to be run with the Docker socket volume-mounted or with the privileged option. I see that the image is being referenced to be used as a container job: https://github.com/dotnet/runtime/blob/cfe26ecb3b677a506711878c19586ddd06117d0e/eng/pipelines/common/platform-matrix.yml#L209-L211. Does that even support either of those methods?

@simonrozsival
Copy link
Member Author

The /var/run/docker.sock volume should be mounted correctly (https://dev.azure.com/dnceng/public/_build/results?buildId=1911472&view=logs&j=0657b2d6-71c1-5c98-76b8-e3cb824cf6bd&t=7162708e-c8ea-47a5-bc28-5a1a3986e307&l=77) so docker-in-docker should work. @directhex tested it locally so he can fill in more details.

@mthalman
Copy link
Member

mthalman commented Aug 1, 2022

Ah, thanks for the pointer. Yes, that should work then.

@mthalman
Copy link
Member

mthalman commented Aug 1, 2022

I can merge this but the Ubuntu pipeline is currently broken: #644 (comment). So that needs to get resolved before an image for this can be built.

@mthalman mthalman merged commit 8fcaabc into dotnet:main Aug 1, 2022
@mthalman
Copy link
Member

mthalman commented Aug 3, 2022

Image is published now. Tag: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-android-20220803135138-8fcaabc

rzikm pushed a commit to rzikm/dotnet-buildtools-prereqs-docker that referenced this pull request Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants