Skip to content

Commit

Permalink
deploy(dockerfile): dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacker233 committed Aug 16, 2023
1 parent ef80825 commit 19d1d58
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
# 基本镜像
FROM node:lts-alpine

# 查看node版本
RUN node -v

# 查看npm版本
RUN npm -v

# 设置工作目录
WORKDIR /app

# 复制 package.json 和 package-lock.json文件到容器中
COPY package*.json ./
# 复制除了node_modules以外的所有文件到容器中
COPY . .

# 查看目录
RUN ls -a

# 删除pnpm-lock.yaml
RUN rm ./pnpm-lock.yaml
RUN rm pnpm-lock.yaml

# 清除npm缓存
RUN rm -rf node_modules
RUN npm cache clear --force

# 安装依赖
RUN npm install pnpm
RUN pnpm install
RUN npm install npm -g
RUN npm install pnpm -g --registry=https://registry.npm.taobao.org
RUN pnpm install --registry=https://registry.npm.taobao.org


# 复制除了node_modules以外的所有文件到容器中
COPY . .

# 编译应用程序
RUN pnpm build
Expand Down

1 comment on commit 19d1d58

@vercel
Copy link

@vercel vercel bot commented on 19d1d58 Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

resume-design – ./

resume-design-kappa.vercel.app

Please sign in to comment.