-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (49 loc) · 2.36 KB
/
Dockerfile
File metadata and controls
59 lines (49 loc) · 2.36 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
FROM cs8898/docker-android-sdk:latest
ARG BUILD_TOOLS_VERSION=33.0.2
ARG FDROID_SERVER_PACKAGE=fdroidserver==2.4.3
ENV PATH="/opt/android-sdk-linux/build-tools/${BUILD_TOOLS_VERSION}:${PATH}"
# install my SDK Packages
COPY mypackagelist /opt/mypackagelist
RUN echo "build-tools;${BUILD_TOOLS_VERSION}" >> /opt/mypackagelist/package-list.txt
RUN /opt/mypackagelist/install-packages.sh
# Workaround for non writeable SDK FOLDER
RUN chmod -R g+rw /opt/android-sdk-linux
# copy some command aliases that need to be early on the path
COPY tools/* /usr/local/sbin/
RUN chmod a+x /usr/local/sbin/run_as_user && \
chmod a+x /usr/local/sbin/ssh && \
chmod a+x /usr/local/sbin/rsync
# install needed tools for helpers (see above)
RUN apt-get update -yqq && \
apt-get install -y \
libnss-wrapper && \
apt-get clean
# install packages for PIL
# See:
# - https://gitlab.com/fdroid/ci-images-base/-/blob/master/Dockerfile
# - https://gist.github.com/azizmb/11343840
RUN build=`uname --hardware-platform` && \
apt-get update -yqq && \
apt-get install -y \
python3-dev libjpeg62 libjpeg-dev libpng16-16 libpng-dev libfreetype6-dev libffi-dev && \
ln -s /usr/lib/${build}-linux-gnu/libjpeg.so /usr/lib && \
ln -s /usr/lib/${build}-linux-gnu/libz.so /usr/lib && \
apt-get clean
# install python3 for fdroid server
RUN apt-get update -yqq && \
apt-get install -y \
python3 python3-pip python3-full python3-setuptools python3-setuptools-rust rsync pipx && \
apt-get clean
USER 1000
ENV PATH="/opt/android-sdk-linux/.local/bin:$PATH"
# install the fdroidserver
RUN pipx install ${FDROID_SERVER_PACKAGE} && \
fdroid --help
## Old Workaround for Missing template files...
# RUN cd /usr/share/doc/fdroidserver/examples && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/config.py && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/fdroid-icon.png && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/makebuildserver.config.py && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/opensc-fdroid.cfg && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/public-read-only-s3-bucket-policy.json && \
# wget https://raw.githubusercontent.com/f-droid/fdroidserver/master/examples/template.yml