forked from AVENTER-UG/docker-matrix-riot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (48 loc) · 1.34 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
FROM alpine:3.5
# Maintainer
MAINTAINER Andreas Peters <[email protected]>, Jon Richter <[email protected]>
# install homeserver template
COPY adds/start.sh /start.sh
# startup configuration
ENTRYPOINT ["/start.sh"]
# Git branch to download
ARG BV_VEC=v0.17.1
ENV BV_VEC=${BV_VEC:-master}
# To rebuild the image, add `--build-arg REBUILD=$(date)` to your docker build
# command.
ARG REBUILD=0
# update and upgrade
# installing riot.im with nodejs/npm
RUN chmod a+x /start.sh \
&& apk update \
&& apk add \
curl \
git \
libevent \
libffi \
libjpeg-turbo \
libssl1.0 \
nodejs \
sqlite-libs \
unzip \
|| exit 1 ; \
npm install -g webpack http-server \
&& curl -L https://github.com/vector-im/riot-web/archive/$BV_VEC.zip -o v.zip \
&& unzip v.zip \
&& rm v.zip \
&& mv riot-web-* riot-web \
&& cd riot-web \
&& npm install \
&& rm -rf /riot-web/node_modules/phantomjs-prebuilt/phantomjs \
&& GIT_VEC=$(git ls-remote https://github.com/vector-im/riot-web $BV_VEC | cut -f 1) \
&& echo "riot: $BV_VEC ($GIT_VEC)" > /synapse.version
COPY config.degrowth.json /riot-web/config.json
WORKDIR /riot-web/
RUN npm run build \
|| exit 1 \
; \
apk del \
git \
unzip \
; \
rm -rf /var/lib/apk/* /var/cache/apk/*