Multi-stage Dockerfile with NuGet restore layer caching, per-node appsettings with Docker hostnames, shared bridge network with infra services, and build/deploy/teardown scripts. Ports use 90xx block to avoid conflicts.
23 lines
591 B
Bash
Executable File
23 lines
591 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
echo "=== ScadaLink Docker Build ==="
|
|
|
|
# Ensure the shared network exists
|
|
if ! docker network inspect scadalink-net >/dev/null 2>&1; then
|
|
echo "Creating scadalink-net network..."
|
|
docker network create scadalink-net
|
|
fi
|
|
|
|
# Build from repo root (so COPY paths in Dockerfile resolve correctly)
|
|
echo "Building scadalink:latest image..."
|
|
docker build \
|
|
-t scadalink:latest \
|
|
-f "$SCRIPT_DIR/Dockerfile" \
|
|
"$REPO_ROOT"
|
|
|
|
echo "Build complete: scadalink:latest"
|