Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 8e80fe4

Browse files
committed
add Dockerfile for Android 26 sdk
1 parent eafc349 commit 8e80fe4

File tree

2 files changed

+74
-2
lines changed

2 files changed

+74
-2
lines changed

26/Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM openjdk:8-jdk
2+
MAINTAINER Maychell Oliveira <[email protected]>
3+
4+
# Android SDK
5+
ENV ANDROID_HOME /srv/var/android-sdk
6+
7+
# Install required tools
8+
RUN apt-get --quiet update --yes \
9+
&& apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 --no-install-recommends
10+
11+
# Install Android SDK tools into ${ANDROID_HOME}
12+
RUN mkdir -p ${ANDROID_HOME}
13+
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \
14+
&& unzip android-sdk.zip -d ${ANDROID_HOME} \
15+
&& rm -f android-sdk.zip
16+
17+
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
18+
19+
# Accept "android-sdk-license" before installing components, no need to echo y for each component
20+
# License is valid for all the standard components in versions installed from this file
21+
# Non-standard components: MIPS system images, preview versions, GDK (Google Glass) and Android Google TV require separate licenses, not accepted there
22+
RUN mkdir -p ${ANDROID_HOME}/licenses \
23+
&& echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > ${ANDROID_HOME}/licenses/android-sdk-license
24+
25+
# Install platform tools
26+
RUN ln -s ${ANDROID_HOME}/bin/sdkmanager /usr/bin/sdkmanager \
27+
&& sdkmanager "platform-tools"
28+
29+
# Emulator
30+
ENV EMULATOR_HOME /srv/var/emulator
31+
# Download emulator
32+
RUN wget https://dl.google.com/android/repository/emulator-linux-4077558.zip -O emulator.zip \
33+
&& unzip -q emulator.zip -d $EMULATOR_HOME \
34+
&& rm -f emulator.zip
35+
36+
# SDKs
37+
# Please keep these in descending order!
38+
RUN echo y | sdkmanager \
39+
"platforms;android-26" \
40+
"build-tools;26.0.2"
41+
42+
RUN ln -s ${EMULATOR_HOME}/emulator64-x86 /usr/bin/emulator64-x86 && \
43+
emulator64-x86 -avd test -no-window -no-audio &

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
1-
# docker-ci-android
2-
Docker Android images used by Gitlab CI
1+
# Codeminer42 Android Image for CI builds
2+
3+
Docker Android images used by Gitlab CI.
4+
5+
## Dependencies
6+
7+
The following dependencies are being installed on all images:
8+
9+
* Android 26 sdk for linux
10+
* Android Emulator
11+
12+
## Tags
13+
14+
We currently have images for the following Android versions.
15+
16+
### Android images
17+
18+
- `26`, `latest` [Dockerfile](https://github.com/Codeminer42/docker-ci-android/blob/master/26/Dockerfile)
19+
20+
## Contributing
21+
22+
`Dockerfiles` are stored under folders for each version.
23+
24+
For updating the images, just open a _pull request_ with
25+
the new `Dockerfile` version and, after accepted, Docker
26+
Hub will build automatically after a few minutes.
27+
28+
The images should setup an environment that is widely used,
29+
please don't install dependencies that are specific to a
30+
project. It's also good to have a pattern and all images
31+
support the same things.

0 commit comments

Comments
 (0)