mirror of
https://github.com/iLay1678/i-tools.git
synced 2025-07-04 03:02:16 +08:00
update dockerfile
This commit is contained in:
parent
d20bd3b634
commit
c50d5ddf71
@ -1,6 +1,6 @@
|
||||
|
||||
# 使用官方的 Node.js 镜像作为基础镜像
|
||||
FROM node:18-alpine
|
||||
FROM oven/bun:latest
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
@ -9,16 +9,16 @@ WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
# 安装项目依赖
|
||||
RUN npm install
|
||||
RUN bun install
|
||||
|
||||
# 复制项目文件到工作目录
|
||||
COPY . .
|
||||
|
||||
# 构建项目(如果需要)
|
||||
RUN npm run build
|
||||
RUN bun build
|
||||
|
||||
# 暴露应用运行的端口(假设应用运行在 3000 端口)
|
||||
EXPOSE 3000
|
||||
|
||||
# 启动应用
|
||||
CMD ["npm", "start"]
|
||||
CMD ["bun", "start"]
|
Loading…
x
Reference in New Issue
Block a user