Skip to content

Instantly share code, notes, and snippets.

@justerror
Created August 9, 2021 10:23
Show Gist options
  • Save justerror/ff828d5e70f10571b3b09b0060ef8306 to your computer and use it in GitHub Desktop.
Save justerror/ff828d5e70f10571b3b09b0060ef8306 to your computer and use it in GitHub Desktop.
Dockerfile for Angular Universal app
FROM --platform=linux/amd64 node:12-alpine as buildContainer
RUN apk --no-cache add git
WORKDIR /app
COPY . ./
RUN npm ci --quiet --unsafe-perm
RUN npm run build:ssr
FROM --platform=linux/amd64 node:12-alpine
WORKDIR /app
COPY --from=buildContainer /app/package.json /app
COPY --from=buildContainer /app/dist /app/dist
EXPOSE 4000
CMD ["npm", "run", "serve:ssr"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment