change df
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
# ----- Stage 1: Build der Angular-Anwendung -----
|
# ----- Stage 1: Build der Angular-Anwendung -----
|
||||||
|
# Diese Stufe bleibt genau gleich. Sie baut Ihre Anwendung.
|
||||||
FROM node:20-alpine AS build
|
FROM node:20-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -7,3 +8,9 @@ COPY . .
|
|||||||
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
|
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
|
||||||
RUN npm run build -- --configuration production
|
RUN npm run build -- --configuration production
|
||||||
|
|
||||||
|
# ----- Stage 2: Erstellen eines minimalen Images mit den Build-Artefakten -----
|
||||||
|
# Wir starten von einem extrem kleinen, leeren Image.
|
||||||
|
FROM scratch
|
||||||
|
# Kopiere NUR die gebauten Dateien aus dem 'build'-Stage in das neue Image.
|
||||||
|
# Ersetze 'frontend', falls dein Projekt in angular.json anders heißt!
|
||||||
|
COPY --from=build /app/dist/frontend /
|
||||||
Reference in New Issue
Block a user