Skip to content

Commit 5f94b3b

Browse files
author
ikepu-tp
committed
Update: Readme
1 parent 79283e6 commit 5f94b3b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Qiita の Markdown 記法については[Markdown 記法 チートシート](htt
2222

2323
Qiita CLI を使うには `Node.js 18.0.0` 以上が必要です。Node.js をはじめて使う場合はインストールする必要があります。
2424

25+
>`Docker`で利用するには`Docker`がインストールされている必要があります。
26+
2527
### 2. Qiita CLI をインストールする
2628

2729
Qiita のコンテンツを管理したいディレクトリで、以下のコマンドを実行します。
@@ -30,6 +32,12 @@ Qiita のコンテンツを管理したいディレクトリで、以下のコ
3032
npm install @qiita/qiita-cli --save-dev
3133
```
3234

35+
>`Docker`で環境を構築する場合は次のコマンドで実行できます。
36+
>
37+
>```console
38+
>docker run --rm -v $(pwd):/opt -w /opt node:20-alpine3.17 sh -c "npm install @qiita/qiita-cli --save-dev && npx qiita init"
39+
>```
40+
3341
以下のコマンドでバージョンが表示されればインストール完了です。
3442
3543
```console
@@ -51,13 +59,21 @@ npm install @qiita/qiita-cli@latest
5159
以下のコマンドを実行することで、
5260

5361
- .gitignore
62+
- Dockerfile
63+
- docker-compose.yml
5464
- GitHub Actions のワークフローファイル
5565
- 「GitHub で記事を管理する」の項目を参照
5666
- ユーザー設定ファイル(qiita.config.json)
5767
- 「ユーザー設定ファイルについて」の項目を参照
5868

5969
が生成されます。
6070

71+
>`Docker`で環境を構築する場合はコンテナを起動してから実行してください。
72+
>
73+
>```console
74+
>docker-compose up -d && docker-compose exec qiita sh
75+
>```
76+
6177
```console
6278
npx qiita init
6379
```

0 commit comments

Comments
 (0)