Skip to content

Commit

Permalink
feat: 优化 Docker 大小
Browse files Browse the repository at this point in the history
  • Loading branch information
imsyy committed Dec 6, 2023
1 parent b90c144 commit a439458
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 部署
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dailyhot_api",
"version": "1.0.4",
"version": "1.0.5",
"description": "一个今日热榜",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a439458

Please sign in to comment.