tuitio/build-amd64.sh

23 lines
820 B
Bash

#!/bin/bash
# chmod u+x build-amd64.sh
echo "Welcome!"
version="1.1.3-alpha2"
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!"