From efde8d1cfd27a4f2b4c7e4946da36b8c11127642 Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 20 May 2020 17:10:40 -0500 Subject: [PATCH] DNS asonix dog --- dns-page/Dockerfile | 5 +++++ dns-page/build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++ mumble-page/Dockerfile | 2 +- mumble-page/build.sh | 43 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 dns-page/Dockerfile create mode 100755 dns-page/build.sh create mode 100755 mumble-page/build.sh diff --git a/dns-page/Dockerfile b/dns-page/Dockerfile new file mode 100644 index 0000000..1c7f545 --- /dev/null +++ b/dns-page/Dockerfile @@ -0,0 +1,5 @@ +FROM arm64v8/nginx:mainline-alpine + +ADD https://git.asonix.dog/asonix/dns-asonix-dog/raw/branch/master/index.html /usr/share/nginx/html/index.html + +RUN chown -R nginx:nginx /usr/share/nginx/html diff --git a/dns-page/build.sh b/dns-page/build.sh new file mode 100755 index 0000000..568d0fa --- /dev/null +++ b/dns-page/build.sh @@ -0,0 +1,43 @@ +#!/usr/bin//env bash + +TAG=$1 + +function require() { + if [ "$1" = "" ]; then + echo "input '$2' required" + print_help + exit 1 + fi +} + +function print_help() { + echo "build.sh" + echo "" + echo "Usage:" + echo " build.sh [tag]" + echo "" + echo "Args:" + echo " tag: The tag of the generated container" +} + +require "$TAG" tag + +if ! docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then + echo "docker is not configured to run on qemu-emulated architectures, fixing will require sudo" + sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes +fi + +set -xe + +docker build \ + --pull \ + --no-cache \ + -f "Dockerfile" \ + -t "asonix/dns-page:$TAG-arm64v8" \ + -t asonix/dns-page:latest-arm64v8 \ + -t asonix/dns-page:latest \ + . + +docker push "asonix/dns-page:$TAG-arm64v8" +docker push asonix/dns-page:latest-arm64v8 +docker push asonix/dns-page:latest diff --git a/mumble-page/Dockerfile b/mumble-page/Dockerfile index 887c428..34d2012 100644 --- a/mumble-page/Dockerfile +++ b/mumble-page/Dockerfile @@ -1,4 +1,4 @@ -FROM arm64v8/nginx:1.17.8-alpine +FROM arm64v8/nginx:mainline-alpine ADD https://git.asonix.dog/asonix/mumble/raw/branch/master/index.html /usr/share/nginx/html/index.html diff --git a/mumble-page/build.sh b/mumble-page/build.sh new file mode 100755 index 0000000..cadebef --- /dev/null +++ b/mumble-page/build.sh @@ -0,0 +1,43 @@ +#!/usr/bin//env bash + +TAG=$1 + +function require() { + if [ "$1" = "" ]; then + echo "input '$2' required" + print_help + exit 1 + fi +} + +function print_help() { + echo "build.sh" + echo "" + echo "Usage:" + echo " build.sh [tag]" + echo "" + echo "Args:" + echo " tag: The tag of the generated container" +} + +require "$TAG" tag + +if ! docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then + echo "docker is not configured to run on qemu-emulated architectures, fixing will require sudo" + sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes +fi + +set -xe + +docker build \ + --pull \ + --no-cache \ + -f "Dockerfile" \ + -t "asonix/mumble-page:$TAG-arm64v8" \ + -t asonix/mumble-page:latest-arm64v8 \ + -t asonix/mumble-page:latest \ + . + +docker push "asonix/mumble-page:$TAG-arm64v8" +docker push asonix/mumble-page:latest-arm64v8 +docker push asonix/mumble-page:latest