diff options
author | pmikus <pmikus@cisco.com> | 2021-02-15 12:01:48 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2021-04-08 11:53:02 +0000 |
commit | d653bff621c44d0af1f4dcb786e9830362cdac38 (patch) | |
tree | 07f2deed1d0ef40c5e630a7f85e43c3e66ef3d5c /fdio.infra.pxe/build.sh | |
parent | df5672b3d9c29b51397f4770eb992c9f3f3955ce (diff) |
Infra: UEFI PXE integrated infra
+ uefi
+ dnsmasq
+ nginx
+ ubuntu focal {arm64|amd64}
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I9974a5b9255d64ba8b8231cf81f59c048b52bbba
Diffstat (limited to 'fdio.infra.pxe/build.sh')
-rwxr-xr-x | fdio.infra.pxe/build.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/fdio.infra.pxe/build.sh b/fdio.infra.pxe/build.sh new file mode 100755 index 0000000000..bd28a4227f --- /dev/null +++ b/fdio.infra.pxe/build.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Clean. +docker container rm --force pxe-dnsmasq +docker image rm pxe-dnsmasq +docker container rm --force pxe-nginx +docker image rm pxe-nginx + +# Build. +docker build \ + --network host \ + --build-arg HTTP_PROXY="$http_proxy" \ + --build-arg HTTPS_PROXY="$http_proxy" \ + --build-arg NO_PROXY="$no_proxy" \ + --build-arg http_proxy="$http_proxy" \ + --build-arg https_proxy="$http_proxy" \ + --build-arg no_proxy="$no_proxy" \ + --tag pxe-dnsmasq docker-dnsmasq/. + +docker build \ + --build-arg HTTP_PROXY="$http_proxy" \ + --build-arg HTTPS_PROXY="$http_proxy" \ + --build-arg NO_PROXY="$no_proxy" \ + --build-arg http_proxy="$http_proxy" \ + --build-arg https_proxy="$http_proxy" \ + --build-arg no_proxy="$no_proxy" \ + --tag pxe-nginx docker-nginx/. + +# Run. +docker run \ + --rm \ + --detach \ + --publish 8081:80 \ + --name pxe-nginx \ + pxe-nginx + +docker run \ + --rm \ + --detach \ + --net host \ + --name pxe-dnsmasq \ + --env "E_INT=$(ip -o -4 route show to default | awk '{print $5}')" \ + --env "E_ADD=$(hostname -I | awk '{print $1}')" \ + --cap-add NET_ADMIN \ + pxe-dnsmasq
\ No newline at end of file |