Saturday, September 13, 2025

Try out Qwen CLI in a docker container sandbox

Overview

This run Qwen in a docker container and mount your current working directory into the docker container which qwen runs on. 
Why? This limit the damage it can do if these things get out of control. E.g. it tries to run rm -rf / , it on effects your current directory and kills the docker container. 

Preqrequisites

1. Docker Desktop
2. Qwen account -> Register on https://chat.qwen.ai/, it is free.

Command Line

Run Qwen CLI in *nix

docker run --rm -it -v .:/src ghcr.io/qwenlm/qwen-code:0.0.10 sh -c "cd /src && qwen"

Run Qwen CLI in Windows

docker run --rm -it --mount type=bind,source=.,target=/src ghcr.io/qwenlm/qwen-code:0.0.10 sh -c "cd /src && qwen