tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Dockerfile (3155B)


      1 FROM          $DOCKER_IMAGE_PARENT
      2 
      3 # Create necessary directories
      4 RUN     mkdir -p /artifacts
      5 
      6 # We need to declare all potentially cache volumes as caches. Also,
      7 # making high I/O paths volumes increase I/O throughput because of
      8 # overlayfs slowness.
      9 VOLUME  /builds/worker/.task-cache/npm
     10 VOLUME  /builds/worker/.task-cache/pip
     11 VOLUME  /builds/worker/.task-cache/uv
     12 VOLUME  /builds/worker/checkouts
     13 VOLUME  /builds/worker/fetches
     14 VOLUME  /builds/worker/tooltool-cache
     15 VOLUME  /builds/worker/workspace
     16 
     17 # In test.sh we accept START_VNC to start a vnc daemon.
     18 # Exposing this port allows it to work.
     19 EXPOSE  5900
     20 
     21 # Add wrapper scripts for xvfb allowing tasks to easily retry starting up xvfb
     22 # %include taskcluster/docker/recipes/xvfb.sh
     23 ADD topsrcdir/taskcluster/docker/recipes/xvfb.sh /builds/worker/scripts/xvfb.sh
     24 
     25 # %include python/mozbuild/mozbuild/action/tooltool.py
     26 ADD topsrcdir/python/mozbuild/mozbuild/action/tooltool.py /builds/worker/scripts/tooltool.py
     27 
     28 # %include taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh
     29 ADD topsrcdir/taskcluster/docker/recipes/ubuntu2404-test-system-setup.sh /setup/system-setup.sh
     30 RUN     bash /setup/system-setup.sh
     31 
     32 # %include taskcluster/scripts/tester/test-linux.sh
     33 ADD topsrcdir/taskcluster/scripts/tester/test-linux.sh /builds/worker/bin/test-linux.sh
     34 
     35 # Set variable normally configured at login, by the shells parent process, these
     36 # are taken from GNU su manual
     37 ENV     LANG            en_US.UTF-8
     38 ENV     LC_ALL          en_US.UTF-8
     39 ENV     PATH            $PATH:/builds/worker/bin
     40 
     41 # This helps not forgetting setting DISPLAY=:0 when running
     42 # tests outside of test.sh
     43 ENV DISPLAY :0
     44 
     45 # Add utilities and configuration
     46 COPY    dot-files/config        /builds/worker/.config
     47 
     48 # Disable apport (app crash reporter) to avoid stealing focus from test runs
     49 ADD apport /etc/default/apport
     50 
     51 # Disable font antialiasing for now to match releng's setup
     52 ADD fonts.conf /builds/worker/.fonts.conf
     53 
     54 # allow the worker user to access video devices
     55 RUN     usermod -a -G video worker
     56 
     57 # Set execution and ownership privileges
     58 RUN     chmod +x bin/*; chown -R worker:worker /builds/worker
     59 
     60 # Set up first-run experience for interactive mode
     61 ADD motd /etc/taskcluster-motd
     62 ADD taskcluster-interactive-shell /bin/taskcluster-interactive-shell
     63 RUN     chmod +x /bin/taskcluster-interactive-shell
     64 
     65 # Per
     66 # https://searchfox.org/mozilla-central/rev/0fe159e3c1a09d9cd22b0ceadbe01efc7e8fd788/uriloader/exthandler/tests/unit/test_handlerService.js#133-139
     67 # we need a http handler configured.
     68 # /usr/bin/firefox doesn't really work but that doesn't matter for this test,
     69 # so we can pretend.
     70 COPY --chown=worker firefox.desktop /builds/worker/.local/share/applications/firefox.desktop
     71 USER worker
     72 RUN update-desktop-database /builds/worker/.local/share/applications
     73 USER root
     74 
     75 # Ubuntu 24.04 (or any other GNOME3 based systems) needs dbus to have various
     76 # test function as expected. Use entrypoint to initialize dbus as root.
     77 COPY dbus.sh /usr/local/bin/dbus.sh
     78 RUN chmod +x /usr/local/bin/dbus.sh
     79 ENTRYPOINT ["/usr/local/bin/dbus.sh"]
     80 
     81 # Set a default command useful for debugging
     82 CMD ["/bin/bash", "--login"]