From 98a281922bcbef88531a31ccf27a959adebf8ea9 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sun, 1 Aug 2021 02:29:29 +0300 Subject: [PATCH] add build.sh --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..a1430ad --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash +echo "Welcome!" + +version="1.0.0" +registryPass="***REMOVED***" + +echo "Create docker image with version $version." +docker image build -t "cdn-admin-frontend:$version" . + +echo "Tag docker image." +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!" \ No newline at end of file