#!/bin/bash echo "Welcome!" version="1.0.0" localRegistryPass="***REMOVED***" echo "Login to dockerhub registry." docker login --username=tstanciu --password=$dockerHubRegistryPass echo "Create docker image with version $version." docker image build -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" . echo "Tag docker image with registry prefix." docker tag network-resurrector-api:$version alpine-nexus:8500/network-resurrector/network-resurrector-api:$version echo "Login to alpine-nexus registry." docker login --username=admin --password=$localRegistryPass alpine-nexus:8500 echo "Push image alpine-nexus:8500/network-resurrector/network-resurrector-api:$version to registry." docker push alpine-nexus:8500/network-resurrector/network-resurrector-api:$version echo "Remove image alpine-nexus:8500/network-resurrector/network-resurrector-api:$version from local machine." docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$version echo "DONE!"