This example demonstrates how to set up a configuration for an Angular application but can work with many other applications built with Node.js as well with slight modification.
As Angular does not require any custom server to run, the "static" runtime is used. After the build is finished, the content of "/app/dist/example-app/" will be hosted by a web server for static website hosting.
services:runtime: staticdockerfile: valist.Dockerfiledist: /app/dist/example_appcmd: node_modules/.bin/ng build --prod
FROM node:alpineWORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .