node-ws/Dockerfile
2025-05-12 19:31:33 +02:00

25 lines
458 B
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Basis-Image
FROM node:22-alpine
# Verzeichnis anlegen
RUN mkdir -p /app/node_modules
# Arbeitsverzeichnis im Container
WORKDIR /app
# Nur package.json und lockfile kopieren
COPY package*.json ./
# Dependencies installieren
RUN npm install
# Volume definieren, damit der Code zur Laufzeit eingebunden wird
VOLUME ["/app/volume"]
# Port freigeben
EXPOSE 8080
# Standardbefehl (z.B. Start der App über bind mount)
CMD ["node", "volume/server.js"]