21 lines
373 B
Docker
21 lines
373 B
Docker
# Leichtes Node-Image
|
|
FROM node:22-alpine
|
|
|
|
# Arbeitsverzeichnis im Container
|
|
WORKDIR /app
|
|
|
|
# package.json & package-lock.json zuerst kopieren (für Docker-Cache)
|
|
COPY package.json package-lock.json* ./
|
|
|
|
# Dependencies installieren
|
|
RUN npm install --production
|
|
|
|
# Restlichen Code kopieren
|
|
COPY . .
|
|
|
|
# Port für Express
|
|
EXPOSE 3000
|
|
|
|
# Startkommando
|
|
CMD ["node", "server.js"]
|