forked from silvio/matrix-riot-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (44 loc) · 1.2 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
FROM alpine:3.4
# Maintainer
MAINTAINER Silvio Fricke <[email protected]>
# install homeserver template
COPY adds/start.sh /start.sh
# startup configuration
ENTRYPOINT ["/start.sh"]
# Git branch to download
ENV 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 \
; \
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-$BV_VEC 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 \
&& npm run build \
; \
apk del \
git \
unzip \
; \
rm -rf /var/lib/apk/* /var/cache/apk/*