-
Notifications
You must be signed in to change notification settings - Fork 115
add basic Android test container #1475
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| FROM ubuntu.azurecr.io/ubuntu:noble AS venv | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -y \ | ||
| cargo \ | ||
| pkg-config \ | ||
| libffi-dev \ | ||
| coreutils \ | ||
| python3-dev \ | ||
| python3-pip \ | ||
| python3-venv \ | ||
| libssl-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN python3 -m venv /venv && \ | ||
| . /venv/bin/activate && \ | ||
| pip download --no-deps helix-scripts --index-url https://dnceng.pkgs.visualstudio.com/public/_packaging/helix-client-prod/pypi/simple && \ | ||
| pip install ./helix_scripts-*-py3-none-any.whl && \ | ||
| rm ./helix_scripts-*-py3-none-any.whl | ||
|
|
||
| FROM ubuntu.azurecr.io/ubuntu:noble | ||
| ARG TARGETARCH | ||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| RUN apt-get update && \ | ||
| apt-get install -qq -y \ | ||
| android-sdk \ | ||
| autoconf \ | ||
| automake \ | ||
| build-essential \ | ||
| cmake \ | ||
| clang \ | ||
| curl \ | ||
| gcc \ | ||
| gdb \ | ||
| git \ | ||
| gss-ntlmssp \ | ||
| iputils-ping \ | ||
| libnuma1 \ | ||
| libtool \ | ||
| libunwind8 \ | ||
| lldb \ | ||
| llvm \ | ||
| locales \ | ||
| locales-all \ | ||
| openjdk-17-jre \ | ||
| python3-dev \ | ||
| python3-pip \ | ||
| python3-venv \ | ||
| qemu-kvm \ | ||
| software-properties-common \ | ||
| sudo \ | ||
| tzdata \ | ||
| unzip \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| \ | ||
| && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 | ||
|
|
||
| ENV LANG=en_US.utf8 | ||
|
|
||
| RUN curl "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/linux/android-sdk/commandlinetools-linux-13114758_latest.zip" -o /tmp/commandlinetools.zip && \ | ||
| mkdir -p /usr/local/android-sdk/cmdline-tools /home/helixbot/.android/avd/android_emu_86_64.avd && \ | ||
| unzip /tmp/commandlinetools.zip -d /usr/local/android-sdk/cmdline-tools && \ | ||
| yes | /usr/local/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager --licenses && \ | ||
| /usr/local/android-sdk/cmdline-tools/cmdline-tools/bin/sdkmanager \ | ||
| --verbose \ | ||
| "system-images;android-31;default;x86_64" \ | ||
| "platforms;android-31" \ | ||
| "platform-tools" \ | ||
| "emulator" && \ | ||
| /usr/local/android-sdk/emulator/mksdcard -l "sdcard64" "3072M" /home/helixbot/.android/avd/android_emu_86_64.avd/sdcard.img | ||
|
|
||
|
|
||
| # Remove user (probably ubuntu) with UID 1000 to UID 2000 to avoid conflict with helixbot | ||
| RUN user_id=$(id -un 1000) && \ | ||
| /usr/sbin/userdel --force --remove $user_id | ||
|
|
||
| # create helixbot user and give rights to sudo without password | ||
| RUN /usr/sbin/adduser --disabled-password --gecos '' --uid 1000 --shell /bin/bash --ingroup adm helixbot && \ | ||
| groupadd -f kvm && \ | ||
| usermod -a -G kvm helixbot && \ | ||
| chmod 755 /root && \ | ||
| echo "helixbot ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/helixbot | ||
|
|
||
| USER helixbot | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than duplicating the Helix content, you should just be able to use
mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-helix-amd64as the base image.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into it. We want to do some prototyping with @akoeplinger and we will likely iterate on this. My goal would be to make it eventually as small as possible.