summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-10-22 12:30:41 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-10-26 10:27:40 +0000
commit4b86e113ae7e2d7f2d42afd76edab9126030fb23 (patch)
tree2d2c706128403bb5c781026d7655cfb0051d4f6c
parent15d5ffb98130044599995c4a40f10e6153290b0d (diff)
Drop exposing additional ports
As the default registry is the only one being set it's no more required to publish ports for each registry listed in images list file. Change-Id: I55a5e1f527bbc98dd4c1e1835c4218dc0fad4c1a Issue-ID: OOM-2605 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rwxr-xr-xbuild/build_nexus_blob.sh17
1 files changed, 0 insertions, 17 deletions
diff --git a/build/build_nexus_blob.sh b/build/build_nexus_blob.sh
index fe69181d..ae3f8870 100755
--- a/build/build_nexus_blob.sh
+++ b/build/build_nexus_blob.sh
@@ -99,21 +99,6 @@ usage () {
exit 1
}
-publish_ports () {
- for REGISTRY in $(sed -n '/\.[^/].*\//p' ${1} | sed -e 's/\/.*$//' | sort -u | grep -v ${DEFAULT_REGISTRY} || true) ${NEXUS_PORT}; do
- if [[ ${REGISTRY} != *":"* ]]; then
- if [[ ${PUBLISHED_PORTS} != *"80:${NEXUS_DOCKER_PORT}"* ]]; then
- PUBLISHED_PORTS="${PUBLISHED_PORTS} -p 80:${NEXUS_DOCKER_PORT}"
- fi
- else
- REGISTRY_PORT="$(sed 's/^.*\:\([[:digit:]]*\)$/\1/' <<< ${REGISTRY})"
- if [[ ${PUBLISHED_PORTS} != *"${REGISTRY_PORT}:${NEXUS_DOCKER_PORT}"* ]]; then
- PUBLISHED_PORTS="${PUBLISHED_PORTS} -p ${REGISTRY_PORT}:${NEXUS_DOCKER_PORT}"
- fi
- fi
- done
-}
-
simulated_hosts () {
SIMUL_HOSTS=($(sed -n '/\.[^/].*\//p' ${1} | sed -e 's/\/.*$// ; s/:.*$//' | sort -u | grep -v ${DEFAULT_REGISTRY} || true ) ${NEXUS_DOMAIN})
for HOST in "${SIMUL_HOSTS[@]}"; do
@@ -305,10 +290,8 @@ fi
# Setup default ports published to host as docker registry
PUBLISHED_PORTS="-p ${NEXUS_PORT}:${NEXUS_PORT} -p ${NEXUS_DOCKER_PORT}:${NEXUS_DOCKER_PORT}"
-# Setup additional ports published to host based on simulated docker registries
# Setup simulated domain names to be able to push all to private Nexus repository
for DOCKER_IMG_LIST in "${NXS_DOCKER_IMG_LISTS[@]}"; do
- publish_ports "${DOCKER_IMG_LIST}"
simulated_hosts "${DOCKER_IMG_LIST}"
done