forked from silvio/docker-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
84 lines (73 loc) · 2.25 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
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
FROM debian:jessie
# Maintainer
MAINTAINER Silvio Fricke <[email protected]>
# update and upgrade
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
git-core \
libevent-dev \
libffi-dev \
libjpeg-dev \
libsqlite3-dev \
libssl-dev \
pwgen \
python-pip \
python-virtualenv \
python2.7-dev \
sqlite3 \
unzip \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
# install homerserver template
ADD adds/start.sh /start.sh
RUN chmod a+x /start.sh
# startup configuration
ENTRYPOINT ["/start.sh"]
CMD ["start"]
EXPOSE 8448
VOLUME ["/data"]
# install/upgrade pip
RUN pip install --upgrade pip setuptools
# "git clone" is cached, we need to invalidate the docker cache here
# to use this add a --build-arg INVALIDATEBUILD=$(data) to your docker build
# parameter.
ENV INVALIDATEBUILD=notinvalidated
# installing vector.im with nodejs/npm
RUN curl -sL https://deb.nodesource.com/setup | bash - \
&& apt-get install -y nodejs \
&& npm install -g webpack http-server
ENV BV_VEC=master
ADD https://github.com/vector-im/vector-web/archive/$BV_VEC.zip v.zip
RUN unzip v.zip \
&& rm v.zip \
&& mv vector-web-$BV_VEC vector-web \
&& cd vector-web \
&& npm install \
&& GIT_VEC=$(git ls-remote https://github.com/vector-im/vector-web $BV_VEC | cut -f 1) \
&& echo "vector: $BV_VEC ($GIT_VEC)" > /synapse.version \
&& npm run build
# install synapse homeserver
ENV BV_SYN=master
ADD https://github.com/matrix-org/synapse/archive/$BV_SYN.zip s.zip
RUN unzip s.zip \
&& rm s.zip \
&& cd /synapse-$BV_SYN \
&& pip install --process-dependency-links . \
&& GIT_SYN=$(git ls-remote https://github.com/matrix-org/synapse $BV_SYN | cut -f 1) \
&& echo "synapse: $BV_SYN ($GIT_SYN)" >> /synapse.version \
&& rm -rf /synapse-$BV_SYN
# install turn-server
ENV BV_TUR=master
ADD https://github.com/coturn/coturn/archive/$BV_TUR.zip c.zip
RUN unzip c.zip \
&& rm c.zip \
&& cd /coturn-$BV_TUR \
&& ./configure \
&& make \
&& make install \
&& GIT_TUR=$(git ls-remote https://github.com/coturn/coturn $BV_TUR | cut -f 1) \
&& echo "coturn: $BV_TUR ($GIT_TUR)" >> /synapse.version \
&& rm -rf /coturn-$BV_TUR