Update Dockerfile
This commit is contained in:
parent
33070b62f1
commit
5e4035692b
52
Dockerfile
52
Dockerfile
|
@ -20,9 +20,9 @@ RUN apt install -y git cargo golang make openssl libssl-dev psmisc time
|
|||
|
||||
RUN mkdir -p /home/user/build /home/user/rdsys /home/user/lox-distributor /home/user/troll-patrol /home/user/simulation
|
||||
|
||||
# Clone all our projects
|
||||
|
||||
# rdsys
|
||||
|
||||
# Clone rdsys
|
||||
WORKDIR /home/user/build
|
||||
RUN git clone https://gitlab.torproject.org/tpo/anti-censorship/rdsys.git
|
||||
WORKDIR /home/user/build/rdsys
|
||||
|
@ -31,19 +31,21 @@ RUN sed -i 's/NUM_BRIDGES = 1000/NUM_BRIDGES = 3600/' scripts/mkdescriptors/main
|
|||
# configure rdsys to give Lox all the bridges
|
||||
RUN cp /home/user/build/config.json conf/
|
||||
|
||||
# Build rdsys and bridge lines
|
||||
WORKDIR /home/user/build/rdsys
|
||||
RUN make build && make descriptors
|
||||
RUN cp -r conf descriptors /home/user/rdsys/
|
||||
# Copy backend executable as "rdsys"
|
||||
RUN cp backend /home/user/rdsys/rdsys
|
||||
|
||||
|
||||
# Clone and build things that depend on each other together
|
||||
|
||||
# Lox distributor
|
||||
WORKDIR /home/user/build
|
||||
RUN git clone https://gitlab.torproject.org/vecna/lox.git
|
||||
WORKDIR /home/user/build/lox
|
||||
RUN git checkout 7b524e771ec444e07fff5b679c8c9e9b557829a0
|
||||
RUN mkdir -p .cargo
|
||||
RUN cp /home/user/build/config.toml .cargo/
|
||||
|
||||
# lox_cli
|
||||
WORKDIR /home/user/build
|
||||
RUN git clone https://git-crysp.uwaterloo.ca/vvecna/lox_cli.git
|
||||
WORKDIR /home/user/build/lox_cli
|
||||
RUN git checkout d7beaad5601ad309fd5936c19e60a7ea98a05fde
|
||||
RUN git checkout 5682b4356962cb1074f93514a6ef6d11fcdc77d5
|
||||
RUN mkdir -p .cargo
|
||||
RUN cp /home/user/build/config.toml .cargo/
|
||||
|
||||
|
@ -55,23 +57,14 @@ RUN git checkout dc7531689c2a5ec5b4c757f95a87f576c4d4020c
|
|||
RUN mkdir -p .cargo
|
||||
RUN cp /home/user/build/config.toml .cargo/
|
||||
|
||||
# Lox Simulation
|
||||
WORKDIR /home/user/build/lox-simulation
|
||||
COPY Cargo.toml /home/user/build/lox-simulation/
|
||||
RUN mkdir src
|
||||
COPY src/* /home/user/build/lox-simulation/src/
|
||||
# lox_cli
|
||||
WORKDIR /home/user/build
|
||||
RUN git clone https://git-crysp.uwaterloo.ca/vvecna/lox_cli.git
|
||||
WORKDIR /home/user/build/lox_cli
|
||||
RUN git checkout d7beaad5601ad309fd5936c19e60a7ea98a05fde
|
||||
RUN mkdir -p .cargo
|
||||
RUN cp /home/user/build/config.toml .cargo/
|
||||
|
||||
# Build all the software
|
||||
|
||||
# Build rdsys and bridge lines
|
||||
WORKDIR /home/user/build/rdsys
|
||||
RUN make build && make descriptors
|
||||
RUN cp -r conf descriptors /home/user/rdsys/
|
||||
# Copy backend executable as "rdsys"
|
||||
RUN cp backend /home/user/rdsys/rdsys
|
||||
|
||||
# Build Lox distributor
|
||||
WORKDIR /home/user/build/lox/crates/lox-distributor
|
||||
RUN cargo update && cargo build --release --features simulation
|
||||
|
@ -82,6 +75,15 @@ WORKDIR /home/user/build/troll-patrol
|
|||
RUN cargo update && cargo build --release --features simulation
|
||||
RUN cp target/release/troll-patrol /home/user/troll-patrol/
|
||||
|
||||
|
||||
# Lox Simulation
|
||||
WORKDIR /home/user/build/lox-simulation
|
||||
COPY Cargo.toml /home/user/build/lox-simulation/
|
||||
RUN mkdir src
|
||||
COPY src/* /home/user/build/lox-simulation/src/
|
||||
RUN mkdir -p .cargo
|
||||
RUN cp /home/user/build/config.toml .cargo/
|
||||
|
||||
# Build simulation
|
||||
WORKDIR /home/user/build/lox-simulation
|
||||
RUN cargo update && cargo build --release
|
||||
|
|
Loading…
Reference in New Issue