feat(scripts): expand docker-prep consumers + python Dockerfile support
- sync-docker-prep.sh: add MindLyst, LysnrAI, talk2obsidian to consumer list
- docker-doctor.sh: detect Python Dockerfiles (python:3.x base) and skip
Node-specific checks (pnpm/corepack, .npmrc.docker ARGs). Python base
images are now in the approved list alongside node:22-{alpine,slim}.
Refs: docker-build-optimization-roadmap.md \xc2\xa7 D
This commit is contained in:
parent
c908c6d7bb
commit
fe979fc789
@ -96,6 +96,13 @@ for df in $DOCKERFILES; do
|
||||
say ""
|
||||
say "── $df"
|
||||
|
||||
# Detect Python vs Node Dockerfiles to apply the right checks.
|
||||
IS_PYTHON=false
|
||||
if grep -qE '^FROM[[:space:]]+python:' "$df"; then
|
||||
IS_PYTHON=true
|
||||
say " (detected Python Dockerfile — skipping Node-specific checks)"
|
||||
fi
|
||||
|
||||
# 3a. Syntax directive (enables BuildKit features)
|
||||
if head -1 "$df" | grep -q '^# syntax=docker/dockerfile'; then
|
||||
ok "BuildKit syntax directive present"
|
||||
@ -103,11 +110,16 @@ for df in $DOCKERFILES; do
|
||||
warn "missing '# syntax=docker/dockerfile:1.7' directive (A2 cache mounts need it)"
|
||||
fi
|
||||
|
||||
# 3b. Base image on approved list
|
||||
if grep -qE '^FROM (\$\{BASE_IMAGE[^}]*\}|node:22-alpine|node:22-slim)' "$df"; then
|
||||
# 3b. Base image on approved list (Node OR Python)
|
||||
if grep -qE '^FROM (\$\{BASE_IMAGE[^}]*\}|node:22-alpine|node:22-slim|python:3\.[0-9]+(-slim|-alpine)?)' "$df"; then
|
||||
ok "approved base image"
|
||||
else
|
||||
err "non-approved base image — must use node:22-alpine, node:22-slim, or \${BASE_IMAGE} ARG"
|
||||
err "non-approved base image — must use node:22-alpine, node:22-slim, python:3.x(-slim/-alpine), or \${BASE_IMAGE} ARG"
|
||||
fi
|
||||
|
||||
# Skip pnpm/Node checks for Python Dockerfiles
|
||||
if $IS_PYTHON; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# 3c. corepack — not legacy global pnpm install
|
||||
|
||||
@ -41,6 +41,9 @@ CONSUMERS=(
|
||||
"learning_ai_trails"
|
||||
"learning_ai_local_memory_gpt"
|
||||
"learning_ai_efforise"
|
||||
"learning_multimodal_memory_agents"
|
||||
"learning_voice_ai_agent"
|
||||
"learning_ai_talk2obsidian"
|
||||
)
|
||||
|
||||
if [ -n "$SINGLE_REPO" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user