forked from openwpm/OpenWPM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (29 loc) · 1.1 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
FROM ubuntu:22.04
SHELL ["/bin/bash", "-c"]
# Update ubuntu and setup conda
# adapted from: https://hub.docker.com/r/conda/miniconda3/dockerfile
RUN sed -i'' 's/archive\.ubuntu\.com/us\.archive\.ubuntu\.com/' /etc/apt/sources.list
RUN apt-get clean -qq \
&& rm -r /var/lib/apt/lists/* -vf \
&& apt-get clean -qq \
&& apt-get update -qq \
&& apt-get upgrade -qq \
# git and make for `npm install`, wget for `install-mamba`
&& apt-get install wget git make -qq \
# deps to run firefox inc. with xvfb
&& apt-get install firefox xvfb libgtk-3-dev libasound2 libdbus-glib-1-2 libpci3 -qq
ENV HOME /opt
COPY scripts/install-mamba.sh .
RUN ./install-mamba.sh
ENV PATH $HOME/mamba/bin:$PATH
# Install OpenWPM
WORKDIR /opt/OpenWPM
COPY . .
RUN ./install.sh
ENV PATH $HOME/mamba/envs/openwpm/bin:$PATH
# Move the firefox binary away from the /opt/OpenWPM root so that it is available if
# we mount a local source code directory as /opt/OpenWPM
RUN mv firefox-bin /opt/firefox-bin
ENV FIREFOX_BINARY /opt/firefox-bin/firefox-bin
# Setting demo.py as the default command
CMD [ "python", "demo.py"]