Skip to content

Commit a07a8d3

Browse files
committed
ドキュメントを更新
1 parent 8f9a682 commit a07a8d3

26 files changed

Lines changed: 615 additions & 5250 deletions
Lines changed: 33 additions & 173 deletions
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,73 @@
1-
# Windows環境でのDockerを使用したLinuxビルド
1+
# Linux Build with Docker on Windows
22

3-
このガイドでは、Windows環境からDockerを使用してLinux向けのビルドを行う方法を説明します。
3+
This guide explains how to build Linux packages from Windows using Docker.
44

5-
## 前提条件
5+
## Prerequisites
66

7-
### 1. Docker Desktopのインストール
7+
- Windows 10/11 (64-bit)
8+
- Docker Desktop (WSL 2 backend recommended)
9+
- PowerShell 5.1+
10+
- At least 8 GB RAM (16 GB recommended)
11+
- At least 20 GB free disk space
812

9-
1. [Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/) をダウンロードしてインストール
10-
2. Docker Desktopを起動し、完全に起動するまで待つ
11-
3. 設定で「Use WSL 2 based engine」が有効になっていることを確認(推奨)
13+
## Build Commands
1214

13-
### 2. システム要件
14-
15-
- **Windows 10/11** (64-bit)
16-
- **WSL 2** (推奨)
17-
- **メモリ**: 最低 8GB RAM (16GB推奨)
18-
- **ディスク空き容量**: 最低 20GB
19-
20-
### 3. PowerShellの要件
21-
22-
PowerShell 5.1以上が必要です(Windows 10/11には標準搭載)
23-
24-
```powershell
25-
# PowerShellのバージョン確認
26-
$PSVersionTable.PSVersion
27-
```
28-
29-
## ビルド方法
30-
31-
### 基本的なビルド
32-
33-
プロジェクトルートから以下のコマンドを実行:
15+
From the project root:
3416

3517
```powershell
36-
# x86_64 (AMD64) Linux用
3718
pnpm run build:tauri:linux-x64
38-
39-
# ARM64 Linux用
4019
pnpm run build:tauri:linux-arm64
4120
```
4221

43-
または、直接スクリプトを実行:
22+
Or run the script directly:
4423

4524
```powershell
46-
# x86_64ビルド
4725
pwsh .\scripts\build-linux-docker.ps1 -Target x64
48-
49-
# ARM64ビルド
5026
pwsh .\scripts\build-linux-docker.ps1 -Target arm64
5127
```
5228

53-
### AppImageを含めたビルド
54-
55-
デフォルトでは `.deb``.rpm` のみが生成されます。AppImageも生成したい場合:
29+
Build with AppImage:
5630

5731
```powershell
5832
pwsh .\scripts\build-linux-docker.ps1 -Target x64 -IncludeAppImage
5933
```
6034

61-
> **注意**: AppImageのビルドにはFUSEが必要で、Docker環境では制限があります。
62-
63-
## ビルド設定のカスタマイズ
64-
65-
`.env` ファイルでビルド設定をカスタマイズできます:
35+
## Build Settings (.env)
6636

6737
```bash
68-
# Docker Build Settings
69-
BUILD_CPUS=4 # 使用するCPUコア数
70-
BUILD_MEMORY=8g # メモリ制限
71-
CARGO_BUILD_JOBS=4 # Cargoの並列ジョブ数
72-
MAKEFLAGS=-j4 # Makeの並列度
73-
INCLUDE_APPIMAGE=false # AppImageを含めるか
38+
BUILD_CPUS=4
39+
BUILD_MEMORY=8g
40+
CARGO_BUILD_JOBS=4
41+
MAKEFLAGS=-j4
42+
INCLUDE_APPIMAGE=false
7443
```
7544

76-
## ビルド成果物
45+
## Output Artifacts
7746

78-
ビルドが完了すると、以下の場所に成果物が生成されます:
79-
80-
```
47+
```text
8148
app/src-tauri/target/<target>/release/bundle/
82-
├── deb/
83-
│ └── drop-compress-image_<version>_<arch>.deb
84-
└── rpm/
85-
└── drop-compress-image-<version>-1.<arch>.rpm
8649
```
8750

88-
例:
51+
- `.deb`
52+
- `.rpm`
53+
- `.AppImage` (optional)
8954

90-
- `app/src-tauri/target/x86_64-unknown-linux-gnu/release/bundle/deb/`
91-
- `app/src-tauri/target/aarch64-unknown-linux-gnu/release/bundle/deb/`
55+
## Troubleshooting
9256

93-
## トラブルシューティング
57+
### Docker Desktop is not running
9458

95-
### Docker Desktopが起動していない
59+
Start Docker Desktop and try again.
9660

97-
```
98-
❌ エラー: Docker Desktop が起動していません。
99-
```
100-
101-
**解決方法**: Docker Desktopを起動してから、再度実行してください。
102-
103-
### メモリ不足エラー
104-
105-
```
106-
error: linking with `cc` failed: exit status: 1
107-
```
108-
109-
**解決方法**: `.env`ファイルでメモリ制限を増やす、またはDocker Desktopの設定でメモリを増やします:
110-
111-
1. Docker Desktop → Settings → Resources → Memory
112-
2. メモリスライダーを増やす(推奨: 8GB以上)
113-
3. Apply & Restartをクリック
114-
115-
### ビルドが遅い
61+
### Out of memory
11662

117-
**解決方法**: CPUコア数とメモリを増やす
63+
Increase Docker memory or `BUILD_MEMORY` in `.env`.
11864

119-
```bash
120-
# .envファイルに追加
121-
BUILD_CPUS=8
122-
BUILD_MEMORY=16g
123-
CARGO_BUILD_JOBS=8
124-
```
125-
126-
### WSL 2バックエンドが無効
127-
128-
**解決方法**:
129-
130-
1. Docker Desktop → Settings → General
131-
2. "Use the WSL 2 based engine"にチェック
132-
3. Apply & Restart
65+
### Slow builds
13366

134-
### ビルドキャッシュをクリアしたい
67+
Increase CPU/memory, and keep Docker cache volumes.
13568

136-
Dockerボリュームを削除:
69+
## References
13770

138-
```powershell
139-
docker volume rm dropwebp-cargo-cache-linux-amd64
140-
docker volume rm dropwebp-pnpm-cache-linux-amd64
141-
docker volume rm dropwebp-target-cache-linux-amd64
142-
```
143-
144-
ARM64の場合:
145-
146-
```powershell
147-
docker volume rm dropwebp-cargo-cache-linux-arm64
148-
docker volume rm dropwebp-pnpm-cache-linux-arm64
149-
docker volume rm dropwebp-target-cache-linux-arm64
150-
```
151-
152-
## 高度な使用方法
153-
154-
### クロスプラットフォームビルド
155-
156-
Windows環境から両方のアーキテクチャをビルド:
157-
158-
```powershell
159-
# x86_64とARM64の両方をビルド
160-
pnpm run build:tauri:linux-x64
161-
pnpm run build:tauri:linux-arm64
162-
```
163-
164-
### カスタムDockerfile
165-
166-
独自のDockerfileを使用する場合:
167-
168-
```powershell
169-
docker build -f YourDockerfile.linux-x64 -t your-builder .
170-
```
171-
172-
### デバッグモード
173-
174-
詳細なログ出力を有効にする:
175-
176-
```powershell
177-
$env:VERBOSE = "1"
178-
pwsh .\scripts\build-linux-docker.ps1 -Target x64
179-
```
180-
181-
## パフォーマンス最適化
182-
183-
### 推奨設定(高性能PC)
184-
185-
```bash
186-
# .envファイル
187-
BUILD_CPUS=12
188-
BUILD_MEMORY=16g
189-
CARGO_BUILD_JOBS=12
190-
MAKEFLAGS=-j12
191-
```
192-
193-
### 推奨設定(一般的なPC)
194-
195-
```bash
196-
# .envファイル
197-
BUILD_CPUS=4
198-
BUILD_MEMORY=8g
199-
CARGO_BUILD_JOBS=4
200-
MAKEFLAGS=-j4
201-
```
202-
203-
## 参考資料
204-
205-
- [Docker Desktop for Windows](https://docs.docker.com/desktop/windows/)
206-
- [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/install)
71+
- [docker-build.md](docker-build.md)
20772
- [Tauri Documentation](https://tauri.app/v1/guides/building/)
208-
209-
## 関連ドキュメント
210-
211-
- [DOCKER_BUILD.md](docker-build.md) - macOS/Linuxでのビルド手順
212-
- [WINDOWS_BUILD_VCPKG.md](./WINDOWS_BUILD_VCPKG.md) - Windowsネイティブビルド
213-
- [MACOS_COMPATIBILITY.md](./MACOS_COMPATIBILITY.md) - macOS互換性情報
73+
- [Docker Desktop for Windows](https://docs.docker.com/desktop/windows/)

0 commit comments

Comments
 (0)