diff --git a/build.sh b/build.sh index 627ddce..1b75dc1 100755 --- a/build.sh +++ b/build.sh @@ -35,33 +35,33 @@ tag=latest container="${domain}/${image}:${tag}" -# if ! command_exists docker; then -# echo_error "Docker does not exist!" -# exit 1 -# fi -# -# [[ ! -e ./Dockerfile ]] && -# echo_error "Dockerfile does not exist" && -# exit 1 -# -# docker build -t "$container" . -# -# docker push "$container" - -release="$(cat /etc/os-release)" - -echo "Would push $container" - -echo "is docker installed?" -if command_exists docker; then - echo "Yes!" -else - echo "No!" +if ! command_exists docker; then + echo_error "Docker does not exist!" + exit 1 fi -echo "What is the hostname? What is path?" -echo "HOSTNAME: $(hostname)" -echo "USER: $(whoami)" -echo "PATH: ${PATH}" -echo "IDS: $(id)" -echo "${release}" +[[ ! -e ./Dockerfile ]] && + echo_error "Dockerfile does not exist" && + exit 1 + +docker build -t "$container" . + +docker push "$container" + +# release="$(cat /etc/os-release)" +# +# echo "Would push $container" +# +# echo "is docker installed?" +# if command_exists docker; then +# echo "Yes!" +# else +# echo "No!" +# fi +# +# echo "What is the hostname? What is path?" +# echo "HOSTNAME: $(hostname)" +# echo "USER: $(whoami)" +# echo "PATH: ${PATH}" +# echo "IDS: $(id)" +# echo "${release}"