Add two version of our own Tor binary

This commit is contained in:
Quentin 2019-09-02 11:22:59 +02:00
parent 3d7a35091a
commit bffcebbb07

View file

@ -1,8 +1,25 @@
FROM fedora:30 as builder FROM fedora:30 as builder
RUN dnf install -y cmake gcc gcc-c++ ninja-build glib2-devel RUN dnf install -y \
coreutils \
cmake \
make \
gcc \
gcc-c++ \
ninja-build \
glib2-devel \
libevent-devel \
zlib-devel \
openssl-devel \
autoconf \
automake \
libzstd-devel \
xz-devel \
git
WORKDIR /home/donar-build WORKDIR /home/donar-build
RUN chown -R 1000 /home/donar-build RUN chown -R 1000 /home/donar-build
USER 1000 USER 1000
COPY ./src ./src COPY ./src ./src
COPY CMakeLists.txt . COPY CMakeLists.txt .
RUN mkdir out && \ RUN mkdir out && \
@ -10,8 +27,32 @@ RUN mkdir out && \
cmake -GNinja .. && \ cmake -GNinja .. && \
ninja ninja
RUN git clone --single-branch --branch patch/relay_2 https://gitlab.inria.fr/qdufour/wide-tor.git tor2 && \
cd ./tor2 && \
./autogen.sh && \
./configure --disable-asciidoc || cat config.log && \
make -j`nproc`
RUN git clone --single-branch --branch master https://gitlab.inria.fr/qdufour/wide-tor.git tor3 && \
cd ./tor3 && \
./autogen.sh && \
./configure --disable-asciidoc && \
make -j`nproc`
#####
FROM fedora:30 FROM fedora:30
RUN dnf install -y glib2 tor valgrind nmap-ncat psmisc RUN dnf install -y \
glib2 \
valgrind \
nmap-ncat \
psmisc \
libevent \
zlib \
openssl \
libzstd \
xz-libs
WORKDIR /home/donar WORKDIR /home/donar
RUN mkdir /home/donar/shared && mkdir /home/donar/res && chown -R 1000 /home/donar RUN mkdir /home/donar/shared && mkdir /home/donar/res && chown -R 1000 /home/donar
USER 1000 USER 1000
@ -20,5 +61,7 @@ COPY --from=builder /home/donar-build/out/donar /usr/local/bin
COPY --from=builder /home/donar-build/out/measlat /usr/local/bin COPY --from=builder /home/donar-build/out/measlat /usr/local/bin
COPY --from=builder /home/donar-build/out/udpecho /usr/local/bin COPY --from=builder /home/donar-build/out/udpecho /usr/local/bin
COPY --from=builder /home/donar-build/out/torecho /usr/local/bin COPY --from=builder /home/donar-build/out/torecho /usr/local/bin
COPY --from=builder /home/donar-build/tor2/src/app/tor /usr/local/bin/tor2
COPY --from=builder /home/donar-build/tor3/src/app/tor /usr/local/bin/tor3
COPY ./scripts/* /usr/local/bin/ COPY ./scripts/* /usr/local/bin/
COPY ./torrc_simple /etc/torrc COPY ./torrc_simple /etc/torrc