feat: 优化 Docker 大小
This commit is contained in:
parent
b90c144a62
commit
a4394588c1
@ -1,13 +1,10 @@
|
||||
FROM node:16
|
||||
|
||||
FROM node:16-alpine
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
RUN npm install --production
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 6688
|
||||
|
||||
CMD ["npm", "start"]
|
@ -85,9 +85,9 @@ docker run -p 6688:6688 -d dailyhot-api
|
||||
|
||||
```bash
|
||||
// 拉取
|
||||
docker pull imsyy/dailyhot-api:1.0.4
|
||||
docker pull imsyy/dailyhot-api:1.0.5
|
||||
// 运行
|
||||
docker run -p 6688:6688 -d imsyy/dailyhot-api:1.0.4
|
||||
docker run -p 6688:6688 -d imsyy/dailyhot-api:1.0.5
|
||||
```
|
||||
|
||||
## Vercel 部署
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dailyhot_api",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "一个今日热榜",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user