代码拉取完成,页面将自动刷新
同步操作将从 dafengzhen/youdeyiwu-frontend 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# syntax=docker/dockerfile:1
FROM node:18 AS deps
LABEL maintainer="dafengzhen" description="构建尤得一物前端应用"
WORKDIR /youdeyiwu-frontend
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .yarnrc* ./
ENV YARN_CACHE_FOLDER=/root/.yarn
RUN --mount=type=cache,target=/root/.yarn \
if [ -f yarn.lock ]; then yarn --verbose --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && yarn install; \
fi
FROM node:18 AS builder
WORKDIR /youdeyiwu-frontend
COPY --from=deps /youdeyiwu-frontend/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED 1
RUN if [ -f yarn.lock ]; then yarn build; \
elif [ -f package-lock.json ]; then npm run build; \
elif [ -f pnpm-lock.yaml ]; then pnpm build; \
else yarn build; \
fi
FROM dafengzhen/distroless-nodejs18-debian11 AS runner
WORKDIR /youdeyiwu-frontend
VOLUME /youdeyiwu-frontend/public/icons
VOLUME /youdeyiwu-frontend/public/images
COPY --from=builder /youdeyiwu-frontend/next.config.js ./next.config.js
COPY --from=builder /youdeyiwu-frontend/public ./public
COPY --from=builder /youdeyiwu-frontend/package.json ./package.json
COPY --from=builder /youdeyiwu-frontend/.next/standalone ./
COPY --from=builder /youdeyiwu-frontend/.next/static ./.next/static
ENV NEXT_TELEMETRY_DISABLED=1 \
NODE_ENV=production \
PORT=3000
EXPOSE $PORT
CMD ["server.js"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。