-
Notifications
You must be signed in to change notification settings - Fork 0
/
tor-debian-8
36 lines (30 loc) · 1.45 KB
/
tor-debian-8
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
36
FROM debian:8
# install packages required for compilation and testing
RUN echo 'deb-src http://deb.debian.org/debian jessie main' >> /etc/apt/sources.list \
&& DEBIAN_FRONTEND=noninteractive apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential gawk bison python3 automake libseccomp-dev git wget \
strace netcat procps nano less \
&& DEBIAN_FRONTEND=noninteractive apt-get -y build-dep tor \
&& DEBIAN_FRONTEND=noninteractive apt-get -y clean \
&& rm -rf -- /var/lib/apt/lists/*
# install all supported glibc versions
COPY common/install_glibc.sh /root/install_glibc.sh
COPY common/run_with_glibc /usr/local/bin/run_with_glibc
RUN chmod +x /root/install_glibc.sh \
&& chmod +x /usr/local/bin/run_with_glibc
RUN /root/install_glibc.sh 2.17 2.18 2.19 2.20 2.21 2.22 2.23 2.24 2.25 2.26 2.27 2.28
RUN useradd -ms /bin/bash user
USER user
WORKDIR /home/user
# create test directory structure
COPY --chown=user common/make_test_torrcd.sh /home/user/make_test_torrcd.sh
RUN chmod +x /home/user/make_test_torrcd.sh \
&& /home/user/make_test_torrcd.sh /home/user
# build tor - systemd support is disabled so we can run tor with gblic versions lower than the system glibc
RUN git clone https://git.torproject.org/tor.git \
&& cd tor \
&& ./autogen.sh \
&& ./configure --disable-systemd \
&& make -j5
CMD ["su", "-", "user", "-c", "/bin/bash"]