mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 03:30:40 +00:00
docs: move Java troubleshooting to sandbox.md
Move the Docker sandbox Java documentation from docs-site to the appropriate location in docs/users/features/sandbox.md under the Troubleshooting section. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
a87e638d79
commit
282dd5b51b
2 changed files with 23 additions and 23 deletions
|
|
@ -1,23 +0,0 @@
|
|||
# Docker sandbox runtime
|
||||
|
||||
## Why Java is not available by default
|
||||
|
||||
The official Qwen Code Docker image is intentionally minimal to keep the image
|
||||
small, secure, and fast to pull.
|
||||
|
||||
Different users require different language runtimes (Java, Python, Node.js, etc.),
|
||||
and bundling all environments into a single image is not practical.
|
||||
|
||||
Therefore, Java is **not included by default** in the Docker sandbox.
|
||||
|
||||
## How to add Java to the Docker sandbox
|
||||
|
||||
If your workflow requires Java, you can extend the base image with your own
|
||||
dependencies. For example:
|
||||
|
||||
```dockerfile
|
||||
FROM qwenlm/qwen-code:latest
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y openjdk-17-jre && \
|
||||
apt-get clean
|
||||
|
|
@ -181,6 +181,29 @@ export SANDBOX_SET_UID_GID=false # Disable UID/GID mapping
|
|||
- Container sandbox: add them via `.qwen/sandbox.Dockerfile` or `.qwen/sandbox.bashrc`.
|
||||
- Seatbelt: your host binaries are used, but the sandbox may restrict access to some paths.
|
||||
|
||||
**Java not available in Docker sandbox**
|
||||
|
||||
The official Qwen Code Docker image is intentionally minimal to keep the image small, secure, and fast to pull. Different users require different language runtimes (Java, Python, Node.js, etc.), and bundling all environments into a single image is not practical. Therefore, Java is **not included by default** in the Docker sandbox.
|
||||
|
||||
If your workflow requires Java, you can extend the base image by creating a `.qwen/sandbox.Dockerfile` in your project:
|
||||
|
||||
```dockerfile
|
||||
FROM ghcr.io/qwenlm/qwen-code:latest
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y openjdk-17-jre && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
```
|
||||
|
||||
Then rebuild the sandbox image:
|
||||
|
||||
```bash
|
||||
QWEN_SANDBOX=docker BUILD_SANDBOX=1 qwen -s
|
||||
```
|
||||
|
||||
For more details on customizing the sandbox, see [Customizing the sandbox environment](/developers/tools/sandbox).
|
||||
|
||||
**Network issues**
|
||||
|
||||
- Check sandbox profile allows network.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue