forked from pastakhov/docker-parsoid
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Dockerfile
35 lines (29 loc) · 869 Bytes
/
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
FROM alpine:3.12
LABEL maintainer="[email protected]"
ENV PARSOID_HOME=/var/lib/parsoid \
PARSOID_USER=parsoid \
# PARSOID_VERSION [v0.8.1, v0.9.0, v0.10.0, v0.11.0, master]
PARSOID_VERSION=v0.11.0
COPY run-parsoid.sh /run-parsoid.sh
# Parsoid setup
RUN set -x \
# Install required packages
&& apk add --no-cache nodejs nodejs-npm python2 git tar bash make g++ \
# Add user
&& adduser -D -u 1000 -s /bin/bash $PARSOID_USER \
# Set permissions
&& chmod -v +x /run-parsoid.sh \
# Core
&& mkdir -p $PARSOID_HOME \
&& git clone \
--branch ${PARSOID_VERSION} \
--single-branch \
--depth 1 \
--quiet \
https://gerrit.wikimedia.org/r/p/mediawiki/services/parsoid \
$PARSOID_HOME \
&& cd $PARSOID_HOME \
&& npm install
EXPOSE 8000
EXPOSE 8001
CMD ["/run-parsoid.sh"]