stellar-lines/Dockerfile
Bastian Wagner b965500129 Docker
2025-04-26 18:36:33 +02:00

29 lines
710 B
Docker

# ---- Build Stage ----
FROM node:18 AS builder
# Arbeitsverzeichnis im Container
WORKDIR /app
# Package-Dateien kopieren und installieren
COPY package.json package-lock.json ./
RUN npm install
# Quellcode kopieren
COPY . .
# Angular Build (Produktionsmodus)
RUN npm run build -- --configuration production
# ---- Run Stage ----
FROM nginx:stable-alpine
# Angular-Output in Nginx kopieren
COPY --from=builder /app/dist/stellar-lines/browser /usr/share/nginx/html
# Optionale eigene Nginx-Konfiguration (wenn gewünscht)
# COPY nginx.conf /etc/nginx/nginx.conf
# Exponiere Port 80
EXPOSE 80
# Start-Befehl (wird automatisch vom Nginx-Image gesetzt)