|
1
|
|
-# This image is published in containers.torproject.org/tpo/applications/tor-browser/base
|
|
|
1
|
+# This image is published in containers.torproject.org/tpo/applications/tor-browser/{android,desktop}
|
|
2
|
2
|
#
|
|
3
|
|
-# Whenever there are changes to this file,
|
|
4
|
|
-# they are autopublished on merge to the tpo/applications/tor-browser repository.
|
|
5
|
|
-#
|
|
6
|
|
-# The image is updated roughly once a month when the tor-browser repository is rebased.
|
|
|
3
|
+# This image is built and published on CI. The CI job that does this is manual,
|
|
|
4
|
+# therefore it's up to the developer or reviewer to trigger this CI job when necessary
|
|
|
5
|
+# e.g. after a RR rebase or big changes to this file.
|
|
7
|
6
|
|
|
8
|
7
|
FROM containers.torproject.org/tpo/tpa/base-images/python:trixie
|
|
9
|
8
|
|
|
|
9
|
+ARG APPLICATION_CHOICE
|
|
|
10
|
+
|
|
10
|
11
|
RUN apt-get update && apt-get install -y \
|
|
|
12
|
+ curl \
|
|
11
|
13
|
git \
|
|
12
|
|
- xvfb
|
|
|
14
|
+ libc6-dev \
|
|
|
15
|
+ xvfb \
|
|
|
16
|
+ zlib1g-dev
|
|
13
|
17
|
|
|
14
|
18
|
RUN git clone --single-branch --depth 1 https://gitlab.torproject.org/tpo/applications/tor-browser.git
|
|
15
|
19
|
|
|
16
|
20
|
# Bootstrap will download and install all dependencies required for building / linting / etc.
|
|
17
|
21
|
RUN cd tor-browser && \
|
|
18
|
|
- yes | MOZBUILD_STATE_PATH=/var/tmp/mozbuild ./mach bootstrap --application-choice "Tor Browser for Desktop" && \
|
|
|
22
|
+ yes | MOZBUILD_STATE_PATH=/var/tmp/mozbuild ./mach bootstrap --application-choice "$APPLICATION_CHOICE" && \
|
|
19
|
23
|
cd ..
|
|
20
|
24
|
|
|
|
25
|
+ENV PATH="/var/tmp/mozbuild/clang/bin:/root/.cargo/bin:$PATH"
|
|
|
26
|
+
|
|
|
27
|
+RUN echo "$APPLICATION_CHOICE" | grep -qi android && \
|
|
|
28
|
+ rustup target add armv7-linux-androideabi \
|
|
|
29
|
+ aarch64-linux-android \
|
|
|
30
|
+ i686-linux-android \
|
|
|
31
|
+ x86_64-linux-android \
|
|
|
32
|
+ || true
|
|
|
33
|
+
|
|
21
|
34
|
RUN rm -rf tor-browser && \
|
|
22
|
35
|
apt-get clean && \
|
|
23
|
|
- rm -rf /var/lib/apt/lists/* |
|
|
36
|
+ rm -rf /var/lib/apt/lists/* && \
|
|
|
37
|
+ rm -rf /var/tmp/mozbuild/toolchains && \
|
|
|
38
|
+ rm -rf /var/tmp/mozbuild/indices && \
|
|
|
39
|
+ rm -rf /var/tmp/mozbuild/android-device |