Skip to content

Commit

Permalink
added docker ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Dec 12, 2024
1 parent 2c31942 commit dd23d0f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
FROM node:22 AS build-stage
FROM node:21-alpine3.20 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build

FROM busybox:1.35
RUN adduser -D static
USER static
WORKDIR /home/static
COPY --from=build-stage /app/dist .
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]
FROM busybox:1.30 AS runner
WORKDIR /app
COPY --from=builder /app/dist .
CMD ["busybox", "httpd", "-f", "-v", "-p", "8080"]

0 comments on commit dd23d0f

Please sign in to comment.