From 80409ef270c67d334e49ab0755de5b94dc4eaee2 Mon Sep 17 00:00:00 2001 From: Tomáš Levora Date: Wed, 4 Sep 2019 10:36:30 +0200 Subject: Change the way of providing docker login password MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- build/build_nexus_blob.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build/build_nexus_blob.sh') diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh index 58f0f83f..0bf23edd 100755 --- a/build/build_nexus_blob.sh +++ b/build/build_nexus_blob.sh @@ -147,7 +147,7 @@ docker_login () { 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 } -- cgit 1.2.3-korg