19 lines
559 B
Bash
19 lines
559 B
Bash
|
#!/bin/bash
|
||
|
echo "Welcome!"
|
||
|
|
||
|
version="1.0.2"
|
||
|
registryPass="*********"
|
||
|
|
||
|
echo "Create docker image with version $version."
|
||
|
docker image build -t "cdn-admin-frontend:$version" .
|
||
|
|
||
|
echo "Tag docker image with registry prefix."
|
||
|
docker tag cdn-admin-frontend:$version alpine-nexus:8500/cdn/cdn-admin-frontend:$version
|
||
|
|
||
|
echo "Login to alpine-nexus registry."
|
||
|
docker login --username=admin --password=$registryPass alpine-nexus:8500
|
||
|
|
||
|
echo "Push image cdn-admin-frontend:$version to registry."
|
||
|
docker push alpine-nexus:8500/cdn/cdn-admin-frontend:$version
|
||
|
|
||
|
echo "DONE!"
|