此版本由Github负责打包docker
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -1,12 +1,27 @@
|
||||
|
||||
FROM node:22-slim AS build
|
||||
FROM node:22-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# RUN npm config set registry https://registry.npmmirror.com
|
||||
RUN corepack enable
|
||||
|
||||
# Copy package.json and your lockfile, here we add pnpm-lock.yaml for illustration
|
||||
# COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
|
||||
COPY . ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm i
|
||||
|
||||
# Copy the entire project
|
||||
COPY .output ./.output
|
||||
# Build the project
|
||||
RUN chmod +x patch-ui-pro.zsh && ./patch-ui-pro.zsh
|
||||
RUN pnpm run build
|
||||
|
||||
# Change the port and host
|
||||
ENV PORT=3000
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", ".output/server/index.mjs"]
|
Reference in New Issue
Block a user