Skip to content

Instantly share code, notes, and snippets.

@rodrigobertin
Last active May 28, 2023 23:34
Show Gist options
  • Save rodrigobertin/595b57516a4e57888e2bf182561e1d06 to your computer and use it in GitHub Desktop.
Save rodrigobertin/595b57516a4e57888e2bf182561e1d06 to your computer and use it in GitHub Desktop.
Dockerized Angular app
node_modules
.angular
FROM node:18-alpine as builder
WORKDIR /app
COPY . /app
RUN npm install --legacy-peer-deps
RUN npm run build --prod
FROM alpine:3.9.6
RUN apk update && \
apk add --no-cache lighttpd && \
rm -rf /var/cache/apk/*
COPY --from=builder /app/dist/encuestas-seawhite/ /var/www/localhost/htdocs/
RUN echo 'server.error-handler-404 = "/index.html"' >> /etc/lighttpd/lighttpd.conf
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment