-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
63 lines (51 loc) · 2.29 KB
/
Dockerfile
File metadata and controls
63 lines (51 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# ====================================================================== #
# Android SDK Docker Image
# ====================================================================== #
# Base image
# ---------------------------------------------------------------------- #
FROM ubuntu:18.04
# Author
# ---------------------------------------------------------------------- #
LABEL maintainer "android@bilue.com.au"
# support multiarch: i386 architecture
# install Java
# install essential tools
# install Qt
RUN dpkg --add-architecture i386 && \
apt-get update -y && \
apt-get install -y libncurses5:i386 libc6:i386 libstdc++6:i386 lib32gcc1 lib32ncurses5 lib32z1 zlib1g:i386 && \
apt-get install -y --no-install-recommends openjdk-11-jdk && \
apt-get install -y git wget zip && \
apt-get install -y curl && \
apt-get install -y make
# update ruby
RUN wget -O ruby-install-0.7.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.7.0.tar.gz
RUN tar -xzvf ruby-install-0.7.0.tar.gz
RUN make -C /ruby-install-0.7.0/ install
RUN ruby-install ruby 2.6.5
ENV RUBY_HOME /opt/rubies/ruby-2.6.5
ENV PATH ${PATH}:${RUBY_HOME}/bin
RUN gem install fastlane -NV --no-document
RUN gem install bundler
# download and install Android SDK
ARG ANDROID_SDK_VERSION=6200805
ENV ANDROID_HOME /opt/android-sdk
RUN mkdir -p ${ANDROID_HOME}/cmdline-tools && \
wget -q https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_VERSION}_latest.zip && \
unzip *tools*linux*.zip -d ${ANDROID_HOME}/cmdline-tools && \
rm *tools*linux*.zip
# set the environment variables
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
ENV PATH ${PATH}:${GRADLE_HOME}/bin:${KOTLIN_HOME}/bin:${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/tools/bin
ENV _JAVA_OPTIONS -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport
# Sets UTF-8 english as the default locale -- necessary for some Java processor in Android (jetifier for example)
RUN apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
# accept the license agreements of the SDK components
ADD license_accepter.sh /opt/
RUN chmod 771 /opt/license_accepter.sh \
&& /opt/license_accepter.sh $ANDROID_HOME
# install sudo
RUN apt-get update -y && apt-get install -y sudo