f42f3e0e08
Own pinned alpine image (3.21@sha256:48b0309c) + smbd/nmbd/wsdd/tini. Dumb by design: smb.conf bind-mounted read-only, no baked name/password, passdb on a volume. Three-daemon stack per the R-6 spike verdict (nmbd required alongside wsdd, else Explorer double-click 0x80070035). build-samba-image.sh helper.
34 lines
1.4 KiB
Bash
34 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# felhom-samba — infra image build+push helper (R-7 slice 1).
|
|
# Run on the build server (192.168.0.180). Mirrors build.sh usage.
|
|
#
|
|
# ./build-samba-image.sh 1.0.0 # build local only
|
|
# ./build-samba-image.sh 1.0.0 --push # build + push to Gitea registry
|
|
#
|
|
# NEVER tags :latest (a floating tag breaks reproducible pins). The controller pins the
|
|
# exact tag in the generated compose. After --push, verify ANONYMOUS pull works (the guest
|
|
# pulls infra images without creds — same as the controller self-update path).
|
|
# =============================================================================
|
|
set -euo pipefail
|
|
|
|
VERSION="${1:?usage: build-samba-image.sh <version> [--push]}"
|
|
ACTION="${2:-}"
|
|
|
|
REGISTRY="gitea.dooplex.hu/admin"
|
|
IMAGE="${REGISTRY}/felhom-samba"
|
|
CTX="$(cd "$(dirname "$0")/../infra-images/samba" && pwd)"
|
|
|
|
echo "[INFO] building ${IMAGE}:${VERSION}"
|
|
echo "[INFO] context: ${CTX}"
|
|
docker build -t "${IMAGE}:${VERSION}" "${CTX}"
|
|
|
|
if [[ "${ACTION}" == "--push" ]]; then
|
|
echo "[INFO] pushing ${IMAGE}:${VERSION}"
|
|
docker push "${IMAGE}:${VERSION}"
|
|
echo "[INFO] pushed. Verify anonymous pull (guest has no registry creds):"
|
|
echo " docker logout ${REGISTRY%%/*} 2>/dev/null; docker pull ${IMAGE}:${VERSION}"
|
|
else
|
|
echo "[INFO] local build only. To push: ./build-samba-image.sh ${VERSION} --push"
|
|
fi
|