This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathDockerfile
64 lines (57 loc) · 1.44 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
FROM alpine:3.5
# Maintainer
MAINTAINER Andreas Peters <support@aventer.biz>
# install homeserver template
COPY adds/start.sh /start.sh
# startup configuration
ENTRYPOINT ["/start.sh"]
# Git branch to download
ARG BV_VEC=v1.3.6
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 \
libevent \
libffi \
libjpeg-turbo \
libssl1.0 \
nodejs \
sqlite-libs \
git \
unzip \
|| exit 1 ; \
npm install -g webpack http-server yarn \
&& 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 \
&& echo "riot: $BV_VEC " > /synapse.version \
&& npm run build \
|| exit 1 \
; \
mv /riot-web/webapp / ; \
echo "$BV_VEC" | tr -d v > /webapp/version ; \
rm -rf /riot-web ; \
rm -rf /root/.npm ; \
rm -rf /tmp/* ; \
rm -rf /urs/lib/node_modules ; \
apk del \
unzip \
libevent \
libffi \
libjpeg-turbo \
libssl1.0 \
sqlite-libs \
git \
curl \
; \
rm -rf /var/lib/apk/* /var/cache/apk/*