Skip to content

Commit 4451805

Browse files
committed
modify frontend dockerfile
1 parent 36c535c commit 4451805

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Dockerfile.frontend

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
FROM node:16-alpine AS deps
1+
FROM node:20-alpine AS deps
22
RUN apk add --no-cache libc6-compat git
33
WORKDIR /app
44
COPY frontend/package.json frontend/yarn.lock ./frontend/
55
RUN cd frontend && yarn install --frozen-lockfile
66

7-
FROM node:16-alpine AS builder
7+
FROM node:20-alpine AS builder
88
RUN apk add --no-cache git
99
WORKDIR /app
1010
# Copy everything
1111
COPY . .
1212
COPY --from=deps /app/frontend/node_modules ./frontend/node_modules
1313
RUN cd frontend && yarn build && yarn install --production --ignore-scripts --prefer-offline
1414

15-
# Production image, copy all the files and run next
16-
FROM node:16-alpine AS runner
15+
# Production image, copy all the files and run docusaurus
16+
FROM node:20-alpine AS runner
1717
WORKDIR /app
1818

1919
ENV NODE_ENV production
2020

2121
RUN addgroup -g 1001 -S nodejs
22-
RUN adduser -S nextjs -u 1001
22+
RUN adduser -S ompweb -u 1001
2323

24-
COPY --from=builder --chown=nextjs:nodejs /app/ .
24+
COPY --from=builder --chown=ompweb:nodejs /app/ .
2525
WORKDIR /app/frontend
2626

27-
USER nextjs
27+
USER ompweb
2828

2929
EXPOSE 3000
3030

31-
CMD ["yarn", "start"]
31+
CMD ["yarn", "serve"]

0 commit comments

Comments
 (0)