Change the way of providing docker login password
As --password is insecure way, changing to recommended way using
--password-stdin instead
Issue-ID: OOM-2087
Change-Id: Ibe1799e9de63476540288b84726260f712d12616
Signed-off-by: Tomáš Levora <t.levora@partner.samsung.com>
diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh
index 58f0f83..0bf23ed 100755
--- a/build/build_nexus_blob.sh
+++ b/build/build_nexus_blob.sh
@@ -147,7 +147,7 @@
for REGISTRY in $(sed -n '/\.[^/].*\//p' ${1} | sed -e 's/\/.*$//' | sort -u | grep -v ${DEFAULT_REGISTRY}) ${DOCKER_REGISTRY}; do
if ! grep -wq ${REGISTRY} ~/.docker/config.json; then
echo "Docker login to ${REGISTRY}"
- docker login -u "${NEXUS_USERNAME}" -p "${NEXUS_PASSWORD}" ${REGISTRY} > /dev/null
+ echo -n "${NEXUS_PASSWORD}" | docker login -u "${NEXUS_USERNAME}" --password-stdin ${REGISTRY} > /dev/null
fi
done
}