docker-ovh/riot/Dockerfile

25 lines
1.1 KiB
Docker
Raw Normal View History

2019-07-22 09:57:43 +02:00
FROM nginx:alpine
ARG version
ARG gpg_key
# Download Riot Web, verify with GPG, then install
RUN apk add --no-cache --virtual .build-deps curl gnupg &&\
curl -sSL https://github.com/vector-im/riot-web/releases/download/${version}/riot-${version}.tar.gz -o riot-web.tar.gz &&\
curl -sSL https://github.com/vector-im/riot-web/releases/download/${version}/riot-${version}.tar.gz.asc -o riot-web.tar.gz.asc &&\
for server in \
hkp://keyserver.ubuntu.com:80 \
hkp://p80.pool.sks-keyservers.net:80 \
ha.pool.sks-keyservers.net \
; do \
echo "Fetching GPG key $gpg_key from $server"; \
gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$gpg_key" && break; \
done &&\
gpg --batch --verify riot-web.tar.gz.asc riot-web.tar.gz &&\
tar -xzf riot-web.tar.gz &&\
mv riot-${version} /etc/riot-web &&\
cp /etc/riot-web/config.sample.json /etc/riot-web/config.json &&\
rm -rf /usr/share/nginx/html && ln -s /etc/riot-web /usr/share/nginx/html &&\
rm riot-web.tar.gz* &&\
apk del .build-deps