#!/bin/bash # ============================================ # Script para construir y subir imagen Docker # Target: 10.10.4.3:5000/bot-lastwar:v2 # ============================================ set -e # Cambiar al directorio del proyecto (carpeta padre de donde está este script) cd "$(dirname "$0")/.." echo "==========================================" echo "Construyendo imagen Docker..." echo "Directorio: $(pwd)" echo "==========================================" # Construir la imagen usando el Dockerfile en docker/ docker build -t bot-lastwar:latest -f docker/Dockerfile . echo "==========================================" echo "Etiquetando imagen para el registry..." echo "==========================================" # Etiquetar la imagen con la versión v2 docker tag bot-lastwar:latest 10.10.4.3:5000/bot-lastwar:v2 echo "==========================================" echo "Subiendo imagen al registry..." echo "==========================================" # Subir al registry docker push 10.10.4.3:5000/bot-lastwar:v2 echo "==========================================" echo "Imagen subida exitosamente:" echo "10.10.4.3:5000/bot-lastwar:v2" echo "=========================================="