Skip to content

Commit

Permalink
Add Docker support (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleState authored Nov 23, 2023
1 parent 6411309 commit 657fd79
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:alpine

WORKDIR /app

# ENV HTTP_PROXY "http://172.17.0.1:7890"
# ENV HTTPS_PROXY "http://172.17.0.1:7890"

RUN apk add --no-cache git \
&& npm install -g pnpm \
&& npm cache clean --force

COPY . /app

RUN pnpm i \
&& rm -rf /root/.npm \
&& pnpm store prune

EXPOSE 5173

CMD ["pnpm", "docs:dev", "--host"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ pnpm i
pnpm docs:dev
```

### Docker

```shell
git clone https://github.com/nakanomikuorg/arch-guide.git
cd ./arch-guide
# 如需使用代理请取消注释 Dockerfile 中的 ENV 并适当修改
docker compose up -d
```

其它系统请参阅 [PnpM 中文文档](https://pnpm.io/zh/installation) 安装 `PnpM`

## 隐私提醒
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "3"

services:
arch-guide:
build: .
container_name: arch-guide
restart: unless-stopped
ports:
- 5173:5173

0 comments on commit 657fd79

Please sign in to comment.