Angular + Docker
Multi-stage Dockerfile: nginx for static sites, a Node server for apps that need one. This page shows exactly what pickstack adds to a Angular project for Docker: the packages, the new files and the changes to existing ones. Every combination is installed, built, linted and tested in CI.
$ npm create pickstack@latest my-app -- --framework angular --modules docker --yesCustomize in the configurator
New files
node_modules dist build .output .nuxt .next .svelte-kit .astro .angular .git .env .env.* !.env.example *.log Dockerfile .dockerignore
# syntax=docker/dockerfile:1 FROM node:24-alpine AS build WORKDIR /app COPY package.json package-lock.json* ./ RUN npm install COPY . . RUN npm run build FROM nginx:1.29-alpine COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /app/dist/my-app/browser /usr/share/nginx/html EXPOSE 80
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
Project files
.dockerignore.gitignoreDockerfileREADME.mdangular.jsonnginx.confpackage.jsonpublic/robots.txtsrc/app/app.config.tssrc/app/app.htmlsrc/app/app.routes.tssrc/app/app.tssrc/app/components/counter/counter.htmlsrc/app/components/counter/counter.tssrc/app/pages/about/about.htmlsrc/app/pages/about/about.tssrc/app/pages/home/home.htmlsrc/app/pages/home/home.tssrc/index.htmlsrc/main.tssrc/styles.csstsconfig.app.jsontsconfig.json