forked from m4tt72/terminal
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 684 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (21 loc) · 684 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /deps
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
FROM node:alpine AS builder
WORKDIR /build
COPY . .
COPY --from=deps /deps/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node:alpine AS runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /build/public ./public
COPY --from=builder /build/.next ./.next
COPY --from=builder /build/node_modules ./node_modules
COPY --from=builder /build/package.json ./package.json
ENV PORT 3000
ENV NEXT_TELEMETRY_DISABLED 1
EXPOSE 3000
CMD ["node_modules/.bin/next", "start"]