Files
dify-docs/ja/self-host/troubleshooting/docker-issues.mdx
Chenhe Gu 767397a9de changed language codes: cn -> zh, jp -> ja. with other supporting structural changes (#565)
* fix redirect language code prefixes

* rename: cn -> zh, jp -> ja

* remove hardcoded ja / zh references

* remove hardcoded 'english' references

* renamed variable names and dict keys to language agnostic names

* fix: add missing language helper methods to PRAnalyzer

- Add get_language_directory() method
- Initialize source_language and target_languages from config
- Fixes AttributeError when generating mixed PR errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

* Refactor/language codes (#240)

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix: update workflow files to use 'source' instead of 'english'

After refactoring the PR analyzer to use 'source' for source language
PRs (instead of hardcoded 'english'), the workflow files need to match.

Changes:
- sync_docs_analyze.yml: pr_type == 'source' (was 'english')
- sync_docs_update.yml: PR_TYPE != 'source' check
- Updated all comments from "English" to "source language"
- Updated all pr_type values in JSON from "english" to "source"

This ensures the workflows trigger correctly with the refactored
config-driven language system.

Related: language code refactoring (cn/jp → zh/ja)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix/workflow source language references (#245)

* test: kitchen sink workflow validation v2

This PR validates the translation workflow after config-driven refactoring:

Changes:
- Add new test file: test-workflow-validation.mdx
- Modify existing file: introduction.mdx
- Update docs.json navigation

Tests:
- New file translation (add workflow)
- Existing file translation (update workflow)
- Navigation sync across languages
- Config-driven language codes (zh/ja instead of cn/jp)
- Source language abstraction (no hardcoded "English")

Expected workflow behavior:
1. Detect changes in en/ directory
2. Translate new file to zh and ja
3. Update modified file translations
4. Sync docs.json for all language sections
5. Commit translated files automatically

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: update workflow paths to use zh/ja instead of cn/jp

Aligns workflow trigger paths with the zh/ja language directory rename.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "fix: update workflow paths to use zh/ja instead of cn/jp"

This reverts commit 9587b7cc5d.

* Revert "test: kitchen sink workflow validation v2"

This reverts commit 4abdd69fd2.

* fix: update workflow paths in doc analyze workflow to use zh/ja instead of cn/jp

* fix: update workflow files to use 'source' instead of 'english'

After refactoring the PR analyzer to use 'source' for source language
PRs (instead of hardcoded 'english'), the workflow files need to match.

Changes:
- sync_docs_analyze.yml: pr_type == 'source' (was 'english')
- sync_docs_update.yml: PR_TYPE != 'source' check
- Updated all comments from "English" to "source language"
- Updated all pr_type values in JSON from "english" to "source"

This ensures the workflows trigger correctly with the refactored
config-driven language system.

Related: language code refactoring (cn/jp → zh/ja)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix

* fix docs.json language codes

* rename previous version docs: cn -> zh, jp -> ja

* rm duplicate redirect entires

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-28 04:00:02 -08:00

125 lines
4.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Dockerの問題
---
<Note> ⚠️ このドキュメントはAIによって自動翻訳されています。不正確な部分がある場合は、[英語版](/en/self-host/troubleshooting/docker-issues)を参照してください。</Note>
## ネットワークと接続
### 502 Bad Gateway
Nginxが間違ったコンテナIPに転送しています。現在のコンテナIPを取得してください
```bash
docker ps -q | xargs -n 1 docker inspect --format '{{ .Name }}: {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
```
以下の行を見つけてください:
```
/docker-web-1: 172.19.0.5
/docker-api-1: 172.19.0.7
```
`dify/docker/nginx/conf.d`を更新してください:
- `http://api:5001`を`http://172.19.0.7:5001`に置き換える
- `http://web:3000`を`http://172.19.0.5:3000`に置き換える
nginxを再起動するか、設定を再読み込みしてください。注意IPはコンテナ再起動時に変更されます。
### localhostサービスにアクセスできない
Dockerコンテナは`127.0.0.1`経由でホストサービスにアクセスできません。代わりにマシンのローカルネットワークIPを使用してください。
ホストで動作しているOpenLLMの場合、Difyを`http://192.168.1.100:port`実際のローカルIPで設定してください。
### ページが永続的に読み込み中でCORSエラーが発生
ドメイン/URLの変更がクロスオリジンの問題を引き起こします。`docker-compose.yml`で更新してください:
- `CONSOLE_API_URL` - コンソールAPIのバックエンドURL
- `CONSOLE_WEB_URL` - コンソールWebのフロントエンドURL
- `SERVICE_API_URL` - サービスAPIのURL
- `APP_API_URL` - WebAppのAPIバックエンドURL
- `APP_WEB_URL` - WebAppのURL
## マウントとボリューム
### Nginx設定のマウント失敗
エラー:
```
Error mounting "/run/desktop/mnt/host/d/Documents/docker/nginx/nginx.conf" to rootfs at "/etc/nginx/nginx.conf": not a directory
```
完全なプロジェクトをクローンしてdockerディレクトリから実行してください
```bash
git clone https://github.com/langgenius/dify.git
cd dify/docker
docker compose up -d
```
### ポート競合
ポート80が既に使用中ですか以下のいずれかを選択してください
1. 競合するサービス通常Apache/Nginxを停止する
```bash
sudo service nginx stop
sudo service apache2 stop
```
2. または`docker-compose.yaml`でポートマッピングを変更する:
```yaml
ports:
- "8080:80" # 異なるポートにマッピング
```
## コンテナ管理
### バックグラウンドシェルの出力を表示
実行中のシェルをリスト表示:
```bash
docker exec -it docker-api-1 ls /tmp/shells/
```
シェル出力を確認:
```bash
docker exec -it docker-api-1 cat /tmp/shells/[shell-id]/output.log
```
### コンテナ再起動の問題
システム再起動後、コンテナの接続が失敗する場合があります。適切な起動順序を確保してください:
```bash
docker compose down
docker compose up -d
```
アクセスする前に、すべてのサービスが正常になるまで待機してください。
## SSRFプロキシ
`ssrf_proxy`コンテナはServer-Side Request Forgery攻撃を防止します。
### プロキシルールのカスタマイズ
`docker/volumes/ssrf_proxy/squid.conf`を編集してACLルールを追加してください
```
# 機密な内部IPへのアクセスをブロック
acl restricted_ip dst 192.168.101.19
acl localnet src 192.168.101.0/24
http_access deny restrictenet
http_access deny all
```
変更後はプロキシコンテナを再起動してください。
### なぜSSRF_PROXYが必要なのか
サービスが内部ネットワークリソースに対して不正なリクエストを行うことを防ぎます。プロキシはサンドボックス化されたサービスからのすべてのアウトバウンドリクエストを傍受してフィルタリングします。