-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (29 loc) · 1.1 KB
/
Dockerfile
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
FROM ubuntu
LABEL maintainer="Giorgos Neokleous <giorgos.neokleous93@gmail.com>"
ARG ANDROID_DIR=/opt/android
ARG DOWNLOAD_DIR="/download"
ARG CMD_DIR="cmdline-tools"
ARG ANDROID_CMD_TOOLS="commandlinetools-linux-6200805_latest.zip"
ARG BUILD_TOOLS="build-tools;29.0.2"
ARG ANDROID_VERSION="29"
SHELL ["/bin/bash", "-c"]
# Dependencies needed for building docker
RUN apt update
RUN apt-get install -y wget unzip openjdk-8-jdk
RUN apt-get install -y lib32stdc++6 libqt5widgets5 lib32z1
RUN mkdir -p ${ANDROID_DIR}/${CMD_DIR}
RUN wget https://dl.google.com/android/repository/${ANDROID_CMD_TOOLS} -P ${DOWNLOAD_DIR}/ && \
unzip -d ${ANDROID_DIR}/$CMD_DIR/ ${DOWNLOAD_DIR}/$ANDROID_CMD_TOOLS && \
rm -rf ${DOWNLOAD_DIR}
ENV ANDROID_HOME=${ANDROID_DIR}
ENV ANDROID_SDK_ROOT=${ANDROID_HOME}
ARG TOOLS_DIR=${ANDROID_HOME}/${CMD_DIR}/tools/bin
RUN yes Y | $TOOLS_DIR/sdkmanager \
tools \
platform-tools \
${BUILD_TOOLS} \
"platforms;android-${ANDROID_VERSION}"
RUN yes Y | $TOOLS_DIR/sdkmanager --licenses
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]