mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-07-01 20:42:07 +00:00
Update Dockerfile
use npm
This commit is contained in:
parent
8710c4f71d
commit
f81c123c83
1 changed files with 6 additions and 6 deletions
|
@ -3,12 +3,12 @@ FROM node:20-alpine AS builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json package-lock.json ./
|
||||
RUN corepack enable
|
||||
RUN yarn install --frozen-lockfile --network-timeout 600000
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production environment
|
||||
FROM node:20-alpine AS runner
|
||||
|
@ -20,11 +20,11 @@ ENV NODE_ENV=production
|
|||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/yarn.lock ./yarn.lock
|
||||
COPY --from=builder /app/package-lock.json ./package-lock.json
|
||||
|
||||
RUN corepack enable
|
||||
RUN yarn install --frozen-lockfile --network-timeout 600000
|
||||
RUN npm install0
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["yarn", "start"]
|
||||
CMD ["npm", "start"]
|
||||
|
|
Loading…
Reference in a new issue