2021-08-14 19:40:36 +03:00
|
|
|
#!/bin/bash
|
|
|
|
echo "Welcome!"
|
|
|
|
|
2022-01-18 19:24:49 +02:00
|
|
|
version="1.0.5"
|
2021-08-14 19:40:36 +03:00
|
|
|
localRegistryPass="***REMOVED***"
|
|
|
|
|
|
|
|
echo "Create docker image with version $version."
|
2022-06-18 09:11:10 +03:00
|
|
|
docker image build --build-arg APP_VERSION=$version -t "network-resurrector-api:$version" -f "src/api/NetworkResurrector.Api/Docker/amd64/Dockerfile" .
|
2021-08-14 19:40:36 +03:00
|
|
|
|
|
|
|
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!"
|