-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
34 lines (28 loc) · 1.07 KB
/
Dockerfile
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
FROM node:12.20.2
# Linux networking tools
RUN apt-get update && apt-get install -y \
iproute2 ethtool iputils-ping iperf3 python3 lsof tcpdump net-tools
# TigerVNC and ratposion
# build with `--build-arg VNC=true`
# (you can run for example:
# /opt/lib/run-in-vnc.sh chromium --disable-gpu --no-sandbox
# to have a VNC server with chromium listening on port 5901)
ADD run-in-vnc.sh /opt/lib/
ARG VNC
RUN if [ -n "$VNC" ] ; then apt-get install -y tigervnc-standalone-server ratpoison ; else echo "No VNC for you" ; fi
# Rust nightly
RUN apt-get install -y curl build-essential
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- --default-toolchain nightly -y
ENV PATH=${PATH}:/root/.cargo/bin
# Add and build rush (synthetic network backend / userspace proxy)
ADD rush /opt/src/rush
WORKDIR /opt/src/rush
RUN cargo build --release
RUN cp /opt/src/rush/target/release/rush /opt/lib/rush
# Add frontend (synthetic network web UI)
ADD frontend /opt/lib/frontend
# Entrypoint / test setup
ADD setup.sh /opt/lib/
WORKDIR /opt/lib
CMD ["/opt/lib/setup.sh"]