From a87e638d796ae9c7a371144eb6730974f56850b7 Mon Sep 17 00:00:00 2001 From: kiri-chenchen Date: Wed, 28 Jan 2026 14:30:20 +0800 Subject: [PATCH 1/2] docs: explain Docker sandbox runtime and Java usage --- docs-site/src/app/docker-runtime/page.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docs-site/src/app/docker-runtime/page.mdx diff --git a/docs-site/src/app/docker-runtime/page.mdx b/docs-site/src/app/docker-runtime/page.mdx new file mode 100644 index 000000000..cd5ea5f86 --- /dev/null +++ b/docs-site/src/app/docker-runtime/page.mdx @@ -0,0 +1,23 @@ +# 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 From 282dd5b51bba57ba77394bd70a338a3c85ff4741 Mon Sep 17 00:00:00 2001 From: pomelo-nwu Date: Mon, 16 Mar 2026 14:42:05 +0800 Subject: [PATCH 2/2] 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 --- docs-site/src/app/docker-runtime/page.mdx | 23 ----------------------- docs/users/features/sandbox.md | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 docs-site/src/app/docker-runtime/page.mdx diff --git a/docs-site/src/app/docker-runtime/page.mdx b/docs-site/src/app/docker-runtime/page.mdx deleted file mode 100644 index cd5ea5f86..000000000 --- a/docs-site/src/app/docker-runtime/page.mdx +++ /dev/null @@ -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 diff --git a/docs/users/features/sandbox.md b/docs/users/features/sandbox.md index 23ea89fe7..8080483d8 100644 --- a/docs/users/features/sandbox.md +++ b/docs/users/features/sandbox.md @@ -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.