Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM ubuntu:18.04
- # Build arguments
- ARG JAVA_VERSION=8
- # Env variables
- ENV SHELL "/bin/bash"
- ENV DEBIAN_FRONTEND noninteractive
- ENV JAVA_VERSION ${JAVA_VERSION}
- ENV ANDROID_HOME /opt/android-sdk-linux
- ENV PATH $PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin
- ENV SDK_PACKAGES \
- "platform-tools" \
- "platforms;android-23" \
- "platforms;android-25" \
- "platforms;android-26" \
- "platforms;android-27" \
- "platforms;android-28" \
- "build-tools;27.0.3" \
- "build-tools;28.0.1"
- ADD package.json /home/dependencies/
- ADD package-lock.json /home/dependencies/
- # Install necessary packages
- RUN apt-get update -y \
- && apt-get -y --no-install-recommends install \
- nodejs \
- npm \
- unzip \
- wget \
- git \
- openjdk-${JAVA_VERSION}-jdk \
- && npm install -g npm@next \
- && apt-get -qqy clean && rm -rf /var/cache/apt/* \
- && wget --progress=dot:giga -O /opt/android-sdk-linux.zip \
- https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip \
- && unzip /opt/android-sdk-linux.zip -d /tmp/android-sdk-linux \
- && rm /opt/android-sdk-linux.zip && mv /tmp/android-sdk-linux $ANDROID_HOME \
- && echo 'y' | sdkmanager ${SDK_PACKAGES}
- # Install project dependencies, in another layer 'cause npm isn't refreshed in previous
- RUN cd home/dependencies/ && npm install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement