-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.cloudron
103 lines (85 loc) · 3.17 KB
/
Dockerfile.cloudron
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
93
94
95
96
97
98
99
100
101
102
103
# Adapted by timconsidine
#
# https://git.cloudron.io/timconsidine/cloudron-galacteek/-/raw/master/Dockerfile
FROM python:3.7-slim-buster
EXPOSE 5900-5904
EXPOSE 4001
EXPOSE 8080
EXPOSE 8000
ENV NOTBIT_DIST_URL "https://gitlab.com/api/v4/projects/27627112/packages/generic/notbit/0.7/notbit.tar.gz"
ENV X11VNC_PASSWORD "galacteek"
ENV DEBIAN_FRONTEND "noninteractive"
ENV QT_QPA_PLATFORM=xcb
ENV DISPLAY=:99
ENV XVFB_WHD=1024x768x24
ENV QTWEBENGINE_DISABLE_SANDBOX=1
ENV PATH "/app/code/bin:${PATH}"
# ENV QTWEBENGINE_CHROMIUM_FLAGS="--disable-gpu-compositing"
# start TC added for Cloudron
ENV XDG_RUNTIME_DIR "/app/data/tmp/runtime-galacteek"
# end TC
RUN echo "${PATH}" >> /etc/bash.bashrc
RUN apt-get update && apt-get install -q -y --force-yes \
gcc git net-tools iproute2 \
libdb5.3-dev libdb-dev libdb5.3 \
file libmagic1 libmagic-mgc \
libgl1-mesa-glx libnss3 libxtst6 libxext6 \
libasound2 libegl1-mesa libpulse-mainloop-glib0 libpulse0 \
libzbar0 xvfb xorg dbus-x11 wget \
xfonts-100dpi xfonts-75dpi x11vnc fluxbox \
libxkbcommon-x11-0 libxkbcommon0 libgl1 xinit x11-xserver-utils \
libxcb-xkb1 libxcb-icccm4 libxcb-composite0 libxcb-util0 \
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \
libxcb-xinerama0 libqt5multimedia5 libqt5multimediaquick5
# start TC added for Cloudron
RUN mkdir -p /app/code
RUN mkdir -p /tmp/.X11-unix
RUN chmod 1777 /tmp/.X11-unix
WORKDIR /app/code
# end TC
# Get ipfs binary
RUN wget http://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-amd64.tar.gz && \
tar -xvf go-ipfs_v0.9.1_linux-amd64.tar.gz && \
cp go-ipfs/ipfs /app/code/bin && cp go-ipfs/ipfs /usr/bin && \
rm go-ipfs_v0.9.1_linux-amd64.tar.gz
# Add source code.
COPY README.rst COPYING LICENSE LICENSE.go-ipfs \
requirements*.txt setup.py galacteek.pro \
/app/code/galacteek/
COPY share /app/code/galacteek/share
COPY galacteek/ /app/code/galacteek/galacteek
COPY requirements.txt requirements-dev.txt \
requirements-extra-markdown.txt \
requirements-rdf-bsddb.txt \
requirements-ui-pyqt-5.15.txt \
./
RUN pip install -U pip wheel && pip install -r requirements.txt && \
pip install -r requirements-dev.txt && \
pip install -r requirements-extra-markdown.txt && \
pip install -r requirements-rdf-bsddb.txt && \
pip install -r requirements-ui-pyqt-5.15.txt
RUN cd /app/code/galacteek && \
python setup.py build build_docs install && \
rm -f requirements*.txt
RUN apt-get remove -y gcc perl
RUN ln -s /usr/lib/x86_64-linux-gnu/libxcb-util.so.0 \
/usr/lib/x86_64-linux-gnu/libxcb-util.so.1
RUN wget ${NOTBIT_DIST_URL} && \
tar -C /usr/bin -xvf notbit.tar.gz && \
rm notbit.tar.gz
# start TC added for Cloudron
RUN mkdir -p /app/data
RUN mkdir -p /app/data/.X-11-unix
RUN mkdir -p /app/data/tmp/runtime-galacteek
RUN mkdir -p /app/data/.local
RUN mkdir -p /app/data/.local/share
RUN mkdir -p /app/data/.local/share/galacteek
RUN mkdir -p /app/data/.local/share/galacteek/main
RUN mkdir -p /app/data/.local/share/galacteek/main/mhashmetadb
RUN useradd -m -u 1000 -d /app/data galacteek
RUN chown -R galacteek /app/data
# end TC
COPY .docker/x11vnc_cloudron_start.sh /
RUN chmod +x /x11vnc_cloudron_start.sh
USER galacteek
CMD ["/x11vnc_cloudron_start.sh", "galacteek", "--config-ipfs-auto", "-d"]