add Android Studio image & update folder naming (#92)

* add Android Studio image & update folder naming

* update android image with studio & java
This commit is contained in:
Eric Paulsen 2021-08-23 09:33:30 -07:00 committed by GitHub
parent eb7d5947d6
commit 030d8815aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 11 deletions

View File

@ -1,11 +1,8 @@
FROM codercom/enterprise-base:ubuntu
FROM codercom/enterprise-java: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
ENV ANDROID_HOME ${ANDROID_SDK_ROOT}
RUN mkdir -p ${ANDROID_SDK_ROOT}
@ -26,5 +23,19 @@ ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/platform-tools
# Install platform android-29.
RUN yes | sdkmanager "platforms;android-29"
# Packages required for multi-editor support
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \
libxtst6 \
libxrender1 \
libfontconfig1 \
libxi6 \
libgtk-3-0
# Install Android Studio
RUN add-apt-repository ppa:maarten-fonville/android-studio && \
apt update && \
apt install -y android-studio && \
ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/studio
# Set back to coder user
USER coder

View File

@ -4,9 +4,9 @@
## Description
Wraps [enterprise-base](../base/README.md) with Android SDK installation.
Wraps [enterprise-java](../java/README.md) with the Android SDK and Studio installations.
## 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.
This image is ready for direct use within Coder. Workspaces created
from this image will be able to use Android Studio to build and launch Android apps.

View File

@ -13,7 +13,7 @@ RUN yum update -y && yum install -y \
gtk3 \
libGL
# Install intellij & java.
# Install intellij
RUN mkdir -p /opt/idea
RUN curl -L "https://download.jetbrains.com/product?code=IIC&latest&distribution=linux" | tar -C /opt/idea --strip-components 1 -xzvf -

View File

@ -11,7 +11,7 @@ RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y \
libxi6 \
libgtk-3-0
# Install intellij & java.
# Install intellij
RUN mkdir -p /opt/idea
RUN curl -L "https://download.jetbrains.com/product?code=IIC&latest&distribution=linux" | tar -C /opt/idea --strip-components 1 -xzvf -

View File

@ -4,8 +4,8 @@ FROM codercom/enterprise-base:ubuntu
USER root
# Install JDK (OpenJDK 8)
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y openjdk-8-jdk
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y openjdk-14-jdk
ENV JAVA_HOME /usr/lib/jvm/java-14-openjdk-amd64
ENV PATH $PATH:$JAVA_HOME/bin
# Install Maven