mirror of
https://github.com/lancachenet/monolithic
synced 2024-11-24 21:13:02 +00:00
Fixed local build script
Build source images instead of pull from docker hub Build monolithic from local repo
This commit is contained in:
parent
f76e531ee1
commit
a8f810c764
1 changed files with 4 additions and 14 deletions
18
build-locally.sh
Normal file → Executable file
18
build-locally.sh
Normal file → Executable file
|
@ -3,30 +3,20 @@
|
||||||
|
|
||||||
PURPLEBOLD="$(tput setf 5 bold)"
|
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"
|
printf "${PURPLEBOLD}Building temporary modified Ubuntu image:\n"
|
||||||
docker build -t lancachenet/ubuntu:latest --progress tty https://github.com/lancachenet/ubuntu.git
|
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"
|
printf "${PURPLEBOLD}Building temporary Ubuntu-Nginx image:\n"
|
||||||
docker build -t lancachenet/ubuntu-nginx:latest --progress tty https://github.com/lancachenet/ubuntu-nginx.git
|
docker build -t lancachenet/ubuntu-nginx:latest --progress tty https://github.com/lancachenet/ubuntu-nginx.git
|
||||||
|
|
||||||
printf "${PURPLEBOLD}Building Monolithic image:\n"
|
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"
|
printf "${PURPLEBOLD}Removing temporary Ubuntu image:\n"
|
||||||
docker rmi lancachenet/ubuntu
|
docker rmi lancachenet/ubuntu
|
||||||
|
|
||||||
printf "${PURPLEBOLD}Removing temporary Ubuntu-Nginx image:\n"
|
printf "${PURPLEBOLD}Removing temporary Ubuntu-Nginx image:\n"
|
||||||
docker rmi lancachenet/ubuntu-nginx
|
docker rmi lancachenet/ubuntu-nginx
|
||||||
|
|
||||||
|
printf "${PURPLEBOLD}Completed local build. Image now available as lancachenet/monolithic:latest\n"
|
||||||
|
docker image ls lancachenet/monolithic:latest
|
Loading…
Reference in a new issue