Build-Kontext verkleinern und Dockerfile bereinigen
Some checks failed
Container-Image bauen und veröffentlichen / build-and-push (push) Failing after 16s
Some checks failed
Container-Image bauen und veröffentlichen / build-and-push (push) Failing after 16s
Der Workflow scheiterte mit ENOSPC auf dem Runner. Ursache ist der volle Datentraeger dort, nicht der Build - was wir beitragen koennen: - 46 der 54 Inter-Schriftdateien waren unbenutzt. Nur die acht in app/layout.tsx referenzierten Schnitte bleiben: 18 MB -> 2 MB. - npm-Cache wird in derselben Schicht entfernt, in der er entsteht. - data/policies aus dem Docker-Kontext genommen; die Datensaetze stehen in der Datenbank, die JSON-Ablage ist reiner Nachweis. Ausserdem im Dockerfile: Eine frühere Bearbeitung hatte ein echtes Steuerzeichen CR in das sed-Muster geschrieben statt der Escape-Folge. Es funktionierte, war aber unlesbar - jetzt wieder 's/\r$//'. Geprueft: Image baut, Container startet, alle acht Schriftschnitte werden ausgeliefert. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
328a32a7f2
commit
faaf0862bf
@ -16,6 +16,8 @@ node_modules
|
||||
# Quelldokumente und Importartefakte werden zur Laufzeit nicht gebraucht
|
||||
data/import
|
||||
data/analyse.json
|
||||
# Die Datensätze liegen in der Datenbank; die JSON-Ablage ist reiner Nachweis.
|
||||
data/policies
|
||||
|
||||
# Quelllisten der Fachbereiche enthalten Namen von Beschäftigten. Das fertige
|
||||
# Image kopiert data/ ohnehin nicht, aber schon die Build-Schicht soll sie
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@ -16,7 +16,9 @@ RUN apt-get update \
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
# Cache in derselben Schicht entfernen: Er wird nur zur Installation gebraucht
|
||||
# und bliebe sonst dauerhaft im Image-Layer liegen.
|
||||
RUN npm ci --no-audit --no-fund && npm cache clean --force
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Prisma-CLI – isolierte Installation samt transitiver Abhängigkeiten, damit
|
||||
@ -25,7 +27,9 @@ RUN npm ci
|
||||
# ---------------------------------------------------------------------------
|
||||
FROM base AS prisma-cli
|
||||
WORKDIR /prisma-cli
|
||||
RUN npm init -y > /dev/null && npm install --omit=dev prisma@6.16.0
|
||||
RUN npm init -y > /dev/null \
|
||||
&& npm install --omit=dev --no-audit --no-fund prisma@6.16.0 \
|
||||
&& npm cache clean --force
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Build
|
||||
@ -76,7 +80,8 @@ COPY --from=builder --chown=nextjs:nodejs /app/node_modules/bcryptjs ./node_modu
|
||||
|
||||
COPY --chown=nextjs:nodejs docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
# Windows-Zeilenenden würden den Shebang unbrauchbar machen
|
||||
RUN sed -i 's/
$//' /usr/local/bin/docker-entrypoint.sh && chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
RUN sed -i 's/\r$//' /usr/local/bin/docker-entrypoint.sh \
|
||||
&& chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
# Ablage der SQLite-Datenbank – als Volume einhängen, sonst ist sie flüchtig
|
||||
RUN mkdir -p /app/data && chown -R nextjs:nodejs /app/data
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user