-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathFocal
92 lines (79 loc) · 3.57 KB
/
Focal
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
FROM ubuntu:20.04
LABEL maintainer="rzlamrr <[email protected]>"
ENV \
DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
JAVA_OPTS=" -Xmx7G " \
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
PATH=~/bin:/usr/local/bin:$PATH \
USE_CCACHE=1 \
CCACHE_COMPRESS=1 \
CCACHE_COMPRESSLEVEL=8 \
TZ=Asia/Jakarta
RUN apt-get update -qqy && apt-get install -y -q --no-install-recommends \
apt-utils apt-transport-https python3-apt \
lsb-core lsb-security ca-certificates systemd udev \
git curl wget wput axel \
binutils coreutils bsdmainutils util-linux patchutils libc6-dev \
ssh openssl libssl-dev sshpass gnupg2 gpg \
android-sdk-platform-tools squashfs-tools \
openjdk-8-jdk ca-certificates-java \
maven nodejs \
python-all-dev python3-dev python3-requests \
zip unzip lzip zlib1g-dev xzdec xz-utils pixz p7zip-full p7zip-rar zstd libzstd-dev lib32z1-dev \
'^liblz4-.*' '^liblzma.*' '^lzma.*' lzop \
build-essential gcc gcc-multilib g++ g++-multilib \
clang lld cmake automake autoconf \
libxml2 libxml2-utils xsltproc expat re2c \
ncurses-bin libncurses5-dev lib32ncurses5-dev bc libreadline-gplv2-dev libsdl1.2-dev libtinfo5 \
file gawk xterm rename tree schedtool software-properties-common \
dos2unix jq flex bison gperf exfat-utils exfat-fuse libb2-dev pngcrush imagemagick advancecomp \
python-is-python2 ninja-build libcrypt-dev \
&& apt-get -y clean && apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists \
&& rm -rf /var/cache/apt/archives \
&& apt-get -qqy purge default-jre-headless
# Install repo from gerrit
RUN curl https://storage.googleapis.com/git-repo-downloads/repo > repo \
&& chmod a+x repo \
&& install repo /usr/local/bin/ \
&& chmod a+rx /usr/local/bin/repo
RUN curl -s https://api.github.com/repos/tcnksm/ghr/releases/latest \
| jq -r '.assets[] | select(.browser_download_url | contains("linux_amd64")) | .browser_download_url' | wget -qi - \
&& tar -xzf ghr_*_amd64.tar.gz --wildcards 'ghr*/ghr' --strip-components 1 \
&& mv ./ghr /usr/local/bin/ && rm -rf ghr_*_amd64.tar.gz \
&& cp /usr/local/bin/ghr /usr/local/bin/gh \
&& chmod a+x /usr/local/bin/ghr /usr/local/bin/gh
# Change timzone
RUN echo "Asia/Jakarta" > /etc/timezone
RUN set -xe \
&& mkdir -p extra && cd extra \
&& wget -q https://ftp.gnu.org/gnu/make/make-4.3.tar.gz \
&& tar xzf make-4.3.tar.gz \
&& cd make-*/ \
&& ./configure && bash ./build.sh 1>/dev/null && install ./make /usr/local/bin/make \
&& cd .. \
&& git clone https://github.com/ccache/ccache.git \
&& cd ccache && git checkout -q v4.2 \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. \
&& make -j8 && make install \
&& cd ../../.. \
&& rm -rf extra
RUN if [ -e /lib/x86_64-linux-gnu/libncurses.so.6 ] && [ ! -e /usr/lib/x86_64-linux-gnu/libncurses.so.5 ]; then \
ln -s /lib/x86_64-linux-gnu/libncurses.so.6 /usr/lib/x86_64-linux-gnu/libncurses.so.5; \
fi
RUN curl --create-dirs -sL -o /etc/udev/rules.d/51-android.rules -O -L \
https://raw.githubusercontent.com/M0Rf30/android-udev-rules/master/51-android.rules \
&& chmod 644 /etc/udev/rules.d/51-android.rules \
&& chown root /etc/udev/rules.d/51-android.rules
# Copy my custom script
COPY dvst.sh /etc/dvst.sh
RUN chmod a+x /etc/dvst.sh \
&& echo "source /etc/dvst.sh" >> /etc/bash.bashrc
COPY zipsigner-3.0.jar /etc/zipsigner-3.0.jar
RUN chmod a+x /etc/zipsigner-3.0.jar
RUN CCACHE_DIR=/srv/ccache ccache -M 5G \
&& chown root /srv/ccache
HEALTHCHECK CMD curl -f http://localhost/ || exit 1
VOLUME ["/srv/ccache"]