22 lines
786 B
Bash
22 lines
786 B
Bash
|
#!/bin/bash
|
||
|
echo "Welcome!"
|
||
|
|
||
|
version="1.0.0"
|
||
|
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!"
|