This repository has been archived by the owner on Jul 4, 2021. It is now read-only.
/
Dockerfile
47 lines (32 loc) 路 1.54 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
FROM ubuntu:xenial as fetcher
RUN apt-get update && \
apt-get install --yes --no-install-recommends unzip=6.* && \
apt-get clean && rm -rf /var/lib/apt/lists/*
ADD https://github.com/wikimedia/wikidata-query-gui/archive/master.zip ./master.zip
# Creates /wikidata-query-gui-master
RUN unzip master.zip && rm master.zip
# TODO this should probably just be a node image?
FROM nginx:stable-alpine as builder
COPY --from=fetcher /wikidata-query-gui-master /tmp/wikidata-query-gui-master
WORKDIR /tmp/wikidata-query-gui-master
# Put wdqs gui in the right place
RUN apk --no-cache add --virtual build-dependencies ca-certificates~=20191127-r0 git~=2.22 nodejs~=10 npm~=10 jq~=1.6 python~=2.7 make~=4.2 g++~=8.3
# TODO do npm build instead of leaving any dev node modules hanging around
RUN mv package.json package.json.orig \
&& jq 'delpaths([["devDependencies","karma-qunit"],["devDependencies","qunitjs"],["devDependencies","sinon"]])' \
> package.json < package.json.orig \
&& jq 'setpath(["devDependencies","less"]; "~2.7.1")' \
> package.json < package.json.orig \
&& npm install
FROM nginx:stable-alpine as final
WORKDIR /usr/share/nginx/html
COPY --from=builder /tmp/wikidata-query-gui-master /usr/share/nginx/html
RUN echo "" > style.css
COPY entrypoint.sh /entrypoint.sh
COPY custom-config.json /templates/custom-config.json
COPY default.conf /templates/default.conf
ENV LANGUAGE=en\
BRAND_TITLE=DockerWikibaseQueryService\
COPYRIGHT_URL=undefined
ENTRYPOINT ["/entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]