From 88112c3a99a8174f3ecda4a5be27ea4c54483b9c Mon Sep 17 00:00:00 2001 From: njalooo Date: Sun, 4 Jun 2023 15:02:13 +0200 Subject: [PATCH 1/7] Create build-locally.sh This script build the monolithic image locally, from the githubs pages. It's intended for cases like the raspberry pi, which operates on arm64 architecture, which isn't available as an image. See https://github.com/lancachenet/monolithic/issues/171. --- build-locally.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 build-locally.sh diff --git a/build-locally.sh b/build-locally.sh new file mode 100644 index 0000000..5aa86bc --- /dev/null +++ b/build-locally.sh @@ -0,0 +1,22 @@ +#!/bin/bash +#This script build the monolithic image locally, for cases like the raspberry pi, which operates on arm64 architecture, which isn't officially supported. + +PURPLEBOLD="$(tput setf 5 bold)" + +printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n" +docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git + +printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" +docker rmi ubuntu + +printf "${PURPLEBOLD}Building temporary Ubuntu-Nginx image:\n" +docker build -t lancachenet/ubuntu-nginx:latest --progress tty https://github.com/lancachenet/ubuntu-nginx.git + +printf "${PURPLEBOLD}Building Monolithic image:\n" +docker build -t lancachenet/monolithic:latest --progress tty https://github.com/lancachenet/monolithic.git + +printf "${PURPLEBOLD}Removing temporary Ubuntu image:\n" +docker rmi lancachenet/ubuntu + +printf "${PURPLEBOLD}Removing temporary Ubuntu-Nginx image:\n" +docker rmi lancachenet/ubuntu-nginx From 157b3a0733f2492cc520e340788f11cc1a292259 Mon Sep 17 00:00:00 2001 From: njalooo Date: Tue, 6 Jun 2023 20:38:27 +0200 Subject: [PATCH 2/7] Added check for existing Ubuntu base image --- build-locally.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/build-locally.sh b/build-locally.sh index 5aa86bc..cbdf0a4 100644 --- a/build-locally.sh +++ b/build-locally.sh @@ -3,11 +3,21 @@ PURPLEBOLD="$(tput setf 5 bold)" +#Checks if image ubuntu already exists: + +IMAGEEXISTS=true +if [[ "$(docker image inspect ubuntu >/dev/null 2>&1 && echo true || echo false)" = "false" ]]; then + IMAGEEXISTS=false +fi + printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n" docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git -printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" -docker rmi ubuntu +#Removes standart Ubuntu image if not present before running: +if [$IMAGEEXISTS" == false]; then + printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" + docker rmi ubuntu +fi printf "${PURPLEBOLD}Building temporary Ubuntu-Nginx image:\n" docker build -t lancachenet/ubuntu-nginx:latest --progress tty https://github.com/lancachenet/ubuntu-nginx.git From cb59a91f90e80fe59685685cef25d751b89de63a Mon Sep 17 00:00:00 2001 From: njalooo Date: Sat, 22 Jul 2023 16:28:17 +0200 Subject: [PATCH 3/7] Synthax error fix by rodikal for build-locally.sh Co-authored-by: Samuel Van Reeth --- build-locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-locally.sh b/build-locally.sh index cbdf0a4..7763e9f 100644 --- a/build-locally.sh +++ b/build-locally.sh @@ -6,7 +6,7 @@ PURPLEBOLD="$(tput setf 5 bold)" #Checks if image ubuntu already exists: IMAGEEXISTS=true -if [[ "$(docker image inspect ubuntu >/dev/null 2>&1 && echo true || echo false)" = "false" ]]; then +if [[ "$(docker image inspect ubuntu >/dev/null 2>&1 && echo true || echo false)" == "false" ]]; then IMAGEEXISTS=false fi From 868f3d0a4049dde79436373d8266d4e26af85f8a Mon Sep 17 00:00:00 2001 From: njalooo Date: Sat, 22 Jul 2023 16:28:36 +0200 Subject: [PATCH 4/7] Synthax error fix by rodikal for build-locally.sh Co-authored-by: Samuel Van Reeth --- build-locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-locally.sh b/build-locally.sh index 7763e9f..c5715fe 100644 --- a/build-locally.sh +++ b/build-locally.sh @@ -14,7 +14,7 @@ printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n" docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git #Removes standart Ubuntu image if not present before running: -if [$IMAGEEXISTS" == false]; then +if [ "$IMAGEEXISTS" == false ]; then printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" docker rmi ubuntu fi From b92c25bdf04ae497fae7b48f793e7e9d32c12283 Mon Sep 17 00:00:00 2001 From: njalooo Date: Sat, 22 Jul 2023 16:28:53 +0200 Subject: [PATCH 5/7] Typo fix by rodikal for build-locally.sh Co-authored-by: Samuel Van Reeth --- build-locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-locally.sh b/build-locally.sh index c5715fe..33c2735 100644 --- a/build-locally.sh +++ b/build-locally.sh @@ -13,7 +13,7 @@ fi printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n" docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git -#Removes standart Ubuntu image if not present before running: +#Removes standard Ubuntu image if not present before running: if [ "$IMAGEEXISTS" == false ]; then printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" docker rmi ubuntu From f76e531ee1393e986eb5321c4de66261a908a83c Mon Sep 17 00:00:00 2001 From: njalooo Date: Sat, 22 Jul 2023 16:29:23 +0200 Subject: [PATCH 6/7] Typo fix by rodikal for build-locally.sh Co-authored-by: Samuel Van Reeth --- build-locally.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-locally.sh b/build-locally.sh index 33c2735..1a0f1d2 100644 --- a/build-locally.sh +++ b/build-locally.sh @@ -15,7 +15,7 @@ docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lanc #Removes standard Ubuntu image if not present before running: if [ "$IMAGEEXISTS" == false ]; then - printf "${PURPLEBOLD}Removing standart Ubuntu image:\n" + printf "${PURPLEBOLD}Removing standard Ubuntu image:\n" docker rmi ubuntu fi From a8f810c7646f0b98f14ccf67acdd08b7b74589ba Mon Sep 17 00:00:00 2001 From: VibroAxe Date: Mon, 24 Jul 2023 08:27:36 +0000 Subject: [PATCH 7/7] Fixed local build script Build source images instead of pull from docker hub Build monolithic from local repo --- build-locally.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) mode change 100644 => 100755 build-locally.sh diff --git a/build-locally.sh b/build-locally.sh old mode 100644 new mode 100755 index 1a0f1d2..fe70881 --- a/build-locally.sh +++ b/build-locally.sh @@ -3,30 +3,20 @@ PURPLEBOLD="$(tput setf 5 bold)" -#Checks if image ubuntu already exists: - -IMAGEEXISTS=true -if [[ "$(docker image inspect ubuntu >/dev/null 2>&1 && echo true || echo false)" == "false" ]]; then - IMAGEEXISTS=false -fi - printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n" docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git -#Removes standard Ubuntu image if not present before running: -if [ "$IMAGEEXISTS" == false ]; then - printf "${PURPLEBOLD}Removing standard Ubuntu image:\n" - docker rmi ubuntu -fi - printf "${PURPLEBOLD}Building temporary Ubuntu-Nginx image:\n" docker build -t lancachenet/ubuntu-nginx:latest --progress tty https://github.com/lancachenet/ubuntu-nginx.git printf "${PURPLEBOLD}Building Monolithic image:\n" -docker build -t lancachenet/monolithic:latest --progress tty https://github.com/lancachenet/monolithic.git +docker build -t lancachenet/monolithic:latest --progress tty . printf "${PURPLEBOLD}Removing temporary Ubuntu image:\n" docker rmi lancachenet/ubuntu printf "${PURPLEBOLD}Removing temporary Ubuntu-Nginx image:\n" docker rmi lancachenet/ubuntu-nginx + +printf "${PURPLEBOLD}Completed local build. Image now available as lancachenet/monolithic:latest\n" +docker image ls lancachenet/monolithic:latest \ No newline at end of file