This repository has been archived by the owner on Jul 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
add Dockerfile for Android 26 sdk #1
Open
Maychell
wants to merge
3
commits into
master
Choose a base branch
from
create-docker-image-for-android-26
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
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 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,45 @@ | ||
FROM openjdk:8-jdk | ||
MAINTAINER Maychell Oliveira <[email protected]> | ||
|
||
# Android SDK | ||
ENV ANDROID_HOME /srv/var/android-sdk | ||
|
||
# Install dependencies | ||
RUN apt-get update -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
wget \ | ||
tar \ | ||
unzip \ | ||
lib32stdc++6 \ | ||
lib32z1 \ | ||
libqt5widgets5 \ | ||
libqt5svg5 | ||
|
||
# Install Android SDK tools into ${ANDROID_HOME} | ||
RUN mkdir -p ${ANDROID_HOME} | ||
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \ | ||
&& unzip android-sdk.zip -d ${ANDROID_HOME} \ | ||
&& rm -f android-sdk.zip | ||
|
||
# Accept "android-sdk-license" before installing components, no need to echo y for each component | ||
# License is valid for all the standard components in versions installed from this file | ||
# Non-standard components: MIPS system images, preview versions, GDK (Google Glass) and Android Google TV require separate licenses, not accepted there | ||
RUN mkdir -p ${ANDROID_HOME}/licenses \ | ||
&& echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > ${ANDROID_HOME}/licenses/android-sdk-license | ||
|
||
# Install Android SDK packages | ||
RUN ln -s ${ANDROID_HOME}/tools/bin/sdkmanager /usr/bin/sdkmanager \ | ||
&& yes | sdkmanager \ | ||
"platform-tools" \ | ||
"platforms;android-26" \ | ||
"build-tools;26.0.2" \ | ||
"emulator" \ | ||
"system-images;android-26;google_apis;x86" | ||
|
||
# Create a virtual device | ||
RUN ln -s ${EMULATOR_HOME}/emulator/emulator /usr/bin/emulator \ | ||
&& ln -s ${ANDROID_HOME}/tools/bin/avdmanager /usr/bin/avdmanager | ||
|
||
RUN echo no | avdmanager create avd -n androidAVD --abi google_apis/x86 --package 'system-images;android-26;google_apis;x86' | ||
|
||
#RUN emulator64-x86 -avd androidAVD -no-window -no-audio & |
This file contains 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 |
---|---|---|
@@ -1,2 +1,31 @@ | ||
# docker-ci-android | ||
Docker Android images used by Gitlab CI | ||
# Codeminer42 Android Image for CI builds | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add an usage instructions/example to the readme |
||
|
||
Docker Android images used by Gitlab CI. | ||
|
||
## Dependencies | ||
|
||
The following dependencies are being installed on all images: | ||
|
||
* Android 26 sdk for linux | ||
* Android Emulator | ||
|
||
## Tags | ||
|
||
We currently have images for the following Android versions. | ||
|
||
### Android images | ||
|
||
- `26`, `latest` [Dockerfile](https://github.com/Codeminer42/docker-ci-android/blob/master/26/Dockerfile) | ||
|
||
## Contributing | ||
|
||
`Dockerfiles` are stored under folders for each version. | ||
|
||
For updating the images, just open a _pull request_ with | ||
the new `Dockerfile` version and, after accepted, Docker | ||
Hub will build automatically after a few minutes. | ||
|
||
The images should setup an environment that is widely used, | ||
please don't install dependencies that are specific to a | ||
project. It's also good to have a pattern and all images | ||
support the same things. |
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.
What is this hash? If this is a license itself, it's not safe to add to the image.
We can create
${ANDROID_HOME}/licenses
as a volume and force to add license on run (with a mounted volume, env var, etc).