2018-01-28 07:26:37 +00:00
|
|
|
FROM bitnami/minideb:stretch
|
2018-02-02 09:20:37 +00:00
|
|
|
|
2018-06-12 07:40:49 +00:00
|
|
|
RUN install_packages xvfb libgtk-3-0 curl ca-certificates bzip2 libdbus-glib-1-2 procps
|
2018-02-08 10:39:07 +00:00
|
|
|
|
2018-02-17 10:29:14 +00:00
|
|
|
RUN curl -o /etc/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts
|
|
|
|
|
2018-06-12 07:40:49 +00:00
|
|
|
RUN useradd -m user --home /app
|
|
|
|
USER user
|
|
|
|
ENV HOME=/app
|
|
|
|
WORKDIR /app
|
|
|
|
|
2018-02-02 09:20:37 +00:00
|
|
|
# These are needed to detect versions
|
2018-01-28 08:13:13 +00:00
|
|
|
ADD .travis.yml .
|
2018-02-02 09:20:37 +00:00
|
|
|
ADD ./webext/manifest.json .
|
|
|
|
|
|
|
|
# Setup Firefox
|
2018-06-12 07:40:49 +00:00
|
|
|
ENV PATH="/app/bin/firefox:${PATH}"
|
2018-02-02 09:20:37 +00:00
|
|
|
ADD ./interfacer/contrib/setup_firefox.sh .
|
2018-01-28 07:26:37 +00:00
|
|
|
RUN ./setup_firefox.sh
|
2018-01-28 08:13:13 +00:00
|
|
|
RUN rm ./setup_firefox.sh && rm .travis.yml
|
2018-02-02 09:20:37 +00:00
|
|
|
|
|
|
|
# Setup Browsh
|
2018-01-28 07:26:37 +00:00
|
|
|
ADD ./interfacer/contrib/setup_browsh.sh .
|
|
|
|
RUN ./setup_browsh.sh
|
2018-02-04 10:02:39 +00:00
|
|
|
# Firefox behaves quite differently to normal on its first run, so by getting
|
|
|
|
# that over and done with here when there's no user to be dissapointed means
|
|
|
|
# that all future runs will be consistent.
|
|
|
|
RUN TERM=xterm script \
|
|
|
|
--return \
|
2018-06-12 07:40:49 +00:00
|
|
|
-c "/app/browsh" \
|
2018-02-04 10:02:39 +00:00
|
|
|
/dev/null \
|
|
|
|
>/dev/null & \
|
|
|
|
sleep 10
|
2018-01-28 08:13:13 +00:00
|
|
|
RUN rm ./setup_browsh.sh && rm manifest.json
|
2018-01-24 02:59:57 +00:00
|
|
|
|
2018-06-12 07:40:49 +00:00
|
|
|
CMD ["/app/browsh"]
|
2018-01-24 02:59:57 +00:00
|
|
|
|