fix: lokale Docker build werkend krijgen
Drie fixes om de container lokaal (en op de NAS) te kunnen builden en draaien: - Dockerfile: clone scrum4me-mcp zonder --recurse-submodules. De Prisma- schema zit al gecommit in het scrum4me-mcp repo; de vendor/scrum4me submodule is alleen nodig voor schema-updates en wijst naar een privaat repo dat tijdens docker build niet bereikbaar is. - Dockerfile: voeg /usr/sbin en /sbin toe aan PATH zodat gosu (in /usr/sbin/gosu na apt-install) gevonden wordt door entrypoint.sh. Zonder dit faalt de container in een restart loop. - Verplaats alle runner scripts naar bin/ en maak etc/ aan, zodat COPY bin/ en COPY etc/ in de Dockerfile bestanden vinden. Verder: - .gitattributes om CRLF-corruptie van shell scripts op Windows te voorkomen (core.autocrlf=true is default actief). - .gitignore: docker-compose.override.yml uitsluiten zodat lokale dev-overrides niet worden gecommit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
9d8a7fe237
commit
47b1de93db
12 changed files with 17 additions and 5 deletions
9
.gitattributes
vendored
Normal file
9
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Force LF for all text files in this repo (Linux container target)
|
||||
* text=auto eol=lf
|
||||
|
||||
# Explicitly mark shell scripts and JS as LF
|
||||
*.sh text eol=lf
|
||||
*.js text eol=lf
|
||||
|
||||
# Binary files
|
||||
*.gz binary
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,6 +2,9 @@
|
|||
.env
|
||||
*.env.local
|
||||
|
||||
# Local dev overrides (niet committen, per ontwikkelaar)
|
||||
docker-compose.override.yml
|
||||
|
||||
# Logs (lokaal testen)
|
||||
*.log
|
||||
*.log.gz
|
||||
|
|
|
|||
10
Dockerfile
10
Dockerfile
|
|
@ -36,16 +36,16 @@ RUN curl -fsSL https://claude.ai/install.sh | bash -s ${CLAUDE_CODE_VERSION} \
|
|||
&& claude --version
|
||||
|
||||
# ----- scrum4me-mcp ------------------------------------------------------
|
||||
# Clone met submodules zodat vendor/scrum4me (Prisma-schema) meekomt.
|
||||
# Pin via build-arg; default = main, in productie altijd op een commit-sha.
|
||||
# Clone zonder submodules — de Prisma-schema zit al gecommit in het repo.
|
||||
# De vendor/scrum4me submodule is alleen nodig om het schema te updaten,
|
||||
# niet om te builden. Pin via build-arg; default = main.
|
||||
ARG MCP_GIT_REPO=https://github.com/madhura68/scrum4me-mcp.git
|
||||
ARG MCP_GIT_REF=main
|
||||
|
||||
RUN git clone --recurse-submodules --branch ${MCP_GIT_REF} --depth 1 \
|
||||
RUN git clone --branch ${MCP_GIT_REF} --depth 1 \
|
||||
${MCP_GIT_REPO} /opt/scrum4me-mcp \
|
||||
&& cd /opt/scrum4me-mcp \
|
||||
&& npm ci --omit=dev --omit=optional || npm install --omit=dev \
|
||||
&& (npm run sync-schema || true) \
|
||||
&& npx prisma generate
|
||||
|
||||
# ----- non-root user -----------------------------------------------------
|
||||
|
|
@ -68,7 +68,7 @@ COPY --chown=agent:agent mcp-config.json ./
|
|||
RUN chmod +x ./bin/*.sh
|
||||
|
||||
# ----- runtime config ----------------------------------------------------
|
||||
ENV PATH=/opt/agent/bin:/usr/local/bin:/usr/bin:/bin \
|
||||
ENV PATH=/opt/agent/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
|
||||
HOME=/home/agent \
|
||||
NPM_CONFIG_CACHE=/var/cache/npm \
|
||||
PNPM_HOME=/var/cache/pnpm \
|
||||
|
|
|
|||
0
etc/.gitkeep
Normal file
0
etc/.gitkeep
Normal file
Loading…
Add table
Add a link
Reference in a new issue