Build OpenWrt in a container? That's simple.
Explore and develop OpenWrt in a container? Don't panic, this is the way.
git clone https://github.com/riverscn/openwrt-dev-container.git
cd openwrt-dev-container
docker-compose run -d devenv bash
-
Install Docker extension in VSCode, and attach your container to VSCode.
-
Open
/workspace
folder in VSCode. -
Open a terminal in VSCode.
-
Clone a openwrt repo into it, and follow its instruction.
Workspace files is stored in two volumes:
-
env-data: persists files in
/workspace
-
env-home: persists files in
/home/vscode
When container is stopped, these files are still there.
You can easily download and upload files in VSCode's "explorer" tab.
You can modify Dockerfile
and docker-compose.yml
to meet your different requirements.