feat: Add Android image (#41)

* feat: Add Android image

* Fix title
This commit is contained in:
Kyle Carberry 2021-01-28 21:25:21 -06:00 committed by GitHub
parent ce6258c83e
commit 8853783dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,29 @@
FROM codercom/enterprise-base:ubuntu
# Run everything as root
USER root
RUN apt-get update && \
apt-get install -y openjdk-14-jdk
ENV ANDROID_SDK_ROOT /usr/lib/android-sdk
RUN mkdir -p ${ANDROID_SDK_ROOT}
# Install cmdline-tools.
RUN cd ${ANDROID_SDK_ROOT} && \
mkdir cmdline-tools && \
cd cmdline-tools && \
wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip && \
unzip *.zip && rm *.zip && \
mv cmdline-tools latest
ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin
# Install build tools.
RUN yes | sdkmanager "build-tools;29.0.3"
ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/platform-tools
# Install platform android-29.
RUN yes | sdkmanager "platforms;android-29"
# Set back to coder user
USER coder

12
images/android/README.md Normal file
View File

@ -0,0 +1,12 @@
# Enterprise Android
[![Docker Pulls](https://img.shields.io/docker/pulls/codercom/enterprise-android?label=codercom%2Fenterprise-android)](https://hub.docker.com/r/codercom/enterprise-android)
## Description
Wraps [enterprise-base](../base/README.md) with Android SDK installation.
## How To Use It
This image is ready for direct use within Coder Enterprise. Environments
created from this image will be able to build and launch Android apps.