Pasa el nombre de la imagen a minúsculas para que Docker acepte la carpeta del servicio.

Un directorio como SALE-HITES-BFF deja de fallar el build por el formato del repositorio.
This commit is contained in:
2026-10-06 19:35:39 -03:00
parent fa125ed616
commit 2c727244df
3 changed files with 17 additions and 12 deletions
+10 -5
View File
@@ -67,14 +67,14 @@ Required:
Image identity:
--name NAME Image repository name (default: last directory of
the service location)
the service location, lowercased)
--tag TAG Local build tag (pom.xml version by default, or
1.0.0-SNAPSHOT if there is no pom.xml). On the
remote only :latest and vYYYY.MM.DD-HH.MM (UTC).
Working directory (defaults to the parent of the script's directory):
--project-dir PATH Service root. The image name is its last directory
(override with env PROJECT_DIR)
--project-dir PATH Service root. The image name is its last directory,
lowercased (override with env PROJECT_DIR)
Build options:
--type java|web Dockerfile location. java (default):
@@ -142,6 +142,11 @@ resolve_dockerfile() {
esac
}
# Docker repository names must be lowercase. ${var,,} needs bash 4+.
lowercase() {
printf '%s' "$1" | tr '[:upper:]' '[:lower:]'
}
# Last directory of the service location (cwd must already be that directory).
image_name_from_location() {
local dir
@@ -149,7 +154,7 @@ image_name_from_location() {
dir="${dir%/}"
[[ -n "$dir" && "$dir" != "/" ]] \
|| die "Cannot derive image name from project directory."
printf '%s' "${dir##*/}"
lowercase "${dir##*/}"
}
require() {
@@ -408,7 +413,7 @@ push_via_registry_tunnel() {
while [[ $# -gt 0 ]]; do
case "$1" in
--remote) REMOTE="$2"; shift 2 ;;
--name) IMAGE_NAME="$2"; shift 2 ;;
--name) IMAGE_NAME="$(lowercase "$2")"; shift 2 ;;
--tag) IMAGE_TAG="$2"; shift 2 ;;
--ssh-key) SSH_KEY="$2"; shift 2 ;;
--ssh-config) SSH_CONFIG="$2"; shift 2 ;;