-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (26 loc) · 1.21 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
# WARNING: DO NOT USE THIS CONTAINER IN PRODUCTION, IT IS INSECURE!
#
# This container will start the 'local' version of rstWeb,
# which doesn't use any authentication. You can use it on your local
# machine, e.g. to work with the rst-workbench, but you shouldn't
# run it on a publicly reachalble server if you store any 'valualble'
# data in rstWeb.
FROM ubuntu:18.04
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install git python-pip phantomjs elinks wget firefox -y && \
pip2 install cherrypy routes selenium pexpect pytest requests imagehash
# Install geckodriver (for using 'headless' Firefox).
WORKDIR /usr/bin
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz && \
tar -xvzf geckodriver-v0.24.0-linux64.tar.gz && \
rm geckodriver-v0.24.0-linux64.tar.gz
# This is a fork of Amir Zeldes' original rstWeb that adds a REST API.
WORKDIR /opt
RUN git clone https://github.com/arne-cl/rstWeb rstweb
# Remove all *.pyc files (incl. those in subdirectories).
# Otherwise, pytest will throw an 'import file mismatch' error.
WORKDIR /opt/rstweb
RUN find -name '*.pyc' -exec rm {} \;
EXPOSE 8080
ENTRYPOINT ["python"]
CMD ["start_local_docker.py"]