Invoice-Builder / Dockerfile
Bhargavssss's picture
Update Dockerfile
d41ba4d verified
raw
history blame
827 Bytes
FROM node:22-alpine AS build
# Install git
RUN apk add --no-cache git
WORKDIR /app
# Clone the repository
RUN git clone https://github.com/al1abb/invoify .
# Install dependencies and build
# Using --no-fund and --no-audit to reduce noise in logs
RUN npm install --no-fund --no-audit
# You can optionally try to update glob to a newer version
# RUN npm install glob@latest --save-dev
RUN npm run build
FROM node:22-alpine AS production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=build --chown=nextjs:nodejs /app/.next ./.next
COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=build --chown=nextjs:nodejs /app/package.json ./package.json
COPY --from=build --chown=nextjs:nodejs /app/public ./public
USER nextjs
EXPOSE 3000
CMD npm start