docs: add mrr tests for weekly execution in 2n-aws and 3n-aws
[csit.git] / fdio.infra.pxe / build.sh
1 #!/bin/bash
2
3 # Clean.
4 docker container rm --force pxe-dnsmasq
5 docker image rm pxe-dnsmasq
6 docker container rm --force pxe-nginx
7 docker image rm pxe-nginx
8
9 # Build.
10 docker build \
11     --network host \
12     --build-arg HTTP_PROXY="$http_proxy" \
13     --build-arg HTTPS_PROXY="$http_proxy" \
14     --build-arg NO_PROXY="$no_proxy" \
15     --build-arg http_proxy="$http_proxy" \
16     --build-arg https_proxy="$http_proxy" \
17     --build-arg no_proxy="$no_proxy" \
18     --tag pxe-dnsmasq docker-dnsmasq/.
19
20 docker build \
21     --build-arg HTTP_PROXY="$http_proxy" \
22     --build-arg HTTPS_PROXY="$http_proxy" \
23     --build-arg NO_PROXY="$no_proxy" \
24     --build-arg http_proxy="$http_proxy" \
25     --build-arg https_proxy="$http_proxy" \
26     --build-arg no_proxy="$no_proxy" \
27     --tag pxe-nginx docker-nginx/.
28
29 # Run.
30 docker run \
31     --rm \
32     --detach \
33     --publish 8081:80 \
34     --name pxe-nginx \
35     pxe-nginx
36
37 docker run \
38     --rm \
39     --detach \
40     --net host \
41     --name pxe-dnsmasq \
42     --env "E_INT=$(ip -o -4 route show to default | awk '{print $5}')" \
43     --env "E_ADD=$(hostname -I | awk '{print $1}')" \
44     --cap-add NET_ADMIN \
45     pxe-dnsmasq