#!/bin/bash # chmod u+x build-amd64.sh echo "Welcome!" version="1.0.1-alpha3" localRegistryPass="***REMOVED***" echo "Create docker image with version $version." docker image build -t "identity-server:$version" -f "IdentityServer.Api/Dockerfile" . echo "Tag docker image with registry prefix." docker tag identity-server:$version alpine-nexus:8500/identity/identity-server:$version echo "Login to alpine-nexus registry." docker login --username=admin --password=$localRegistryPass alpine-nexus:8500 echo "Push image alpine-nexus:8500/identity/identity-server:$version to registry." docker push alpine-nexus:8500/identity/identity-server:$version echo "Remove image alpine-nexus:8500/identity/identity-server:$version from local machine." docker rmi alpine-nexus:8500/identity/identity-server:$version echo "DONE!"