#!/bin/bash # ============================================================================= # ngn-agent Docker Image Build Script # # D-04: Single-command build entry point at docker/build.sh. # Builds the custom Hermes Docker image with platform engineering tools. # D-05: Tag: ngn-agent:latest (local only, no registry push). # ============================================================================= set -euo pipefail IMAGE_NAME="ngn-agent" IMAGE_TAG="latest" # Resolve script location — ensures build context is the docker/ directory # (not the repo root, preventing accidental build context leaks — T-09-02) DOCKER_DIR="$(cd "$(dirname "$0")" && pwd)" echo "==> Building ${IMAGE_NAME}:${IMAGE_TAG}..." docker build \ -t "${IMAGE_NAME}:${IMAGE_TAG}" \ -f "${DOCKER_DIR}/Dockerfile" \ "${DOCKER_DIR}" echo "==> Build complete: ${IMAGE_NAME}:${IMAGE_TAG}" docker images "${IMAGE_NAME}:${IMAGE_TAG}"