Make explicit the use of the networking as user mode for LAN_IF using "host".
OpenWrt qemu docker container for x86_64, arm64 and Weidmueller u-OS
OpenWrt in a docker container utilizing qemu. Tested on Raspberry Pi 5 and Weidmueller UC20-M4000 PLC but should work on any x86_64 and ARM64 (aarch64) based hardware. It uses high-performance QEMU options (like KVM acceleration, kernel-mode networking, IO threading, etc.) to achieve near-native speed. 4 and
- Docker images can be found a docker hub https://hub.docker.com/r/albrechtloh/openwrt-docker
- Weidmueller u-OS apps are currently only available via Github Actions https://github.com/AlbrechtL/openwrt-docker/actions
Features
- KVM acceleration
- Web-based viewer for tty console
- Attaches two physical Ethernet interfaces (LAN/WAN) exclusively into the docker container
- Create virtual LAN between OpenWrt and host system (LAN only)
- USB passthrough e.g. for modem or Wi-Fi
- Automatic config migration when OpenWrt is updated (experimental)
Pre-installed OpenWrt software packages
Because OpenWrt doesn't provide a user installed package update mechanism all required packages needs to be included into the OpenWrt rootfs image. This Docker images adds the following software to the OpenWrt rootfs:
- Luci Web interface
- ssh server
- Wi-Fi client and access point support
- Wireguard
- mDNS support
Supported USB devices
- Mediathek MT7961AU Wi-Fi 6 AX chipset based devices e.g. (FENVI 1800Mbps WiFi 6 USB Adapter)
- SIMCOM SIM8262E-M2 based devices (Multi-Band 5G NR/LTE-FDD/LTE-TDD/HSPA+ modem)
Usage
See docker-compose.yml
Build and run
docker compose up
If you like to specify a specific OpenWrt version you can do
docker build -t openwrt-docker . --build-arg OPENWRT_VERSION="23.05.4" && docker compose up
or for the latest development master. The --no-cache option is necessary to get always the newest version.
docker build --no-cache -t openwrt-docker . --build-arg OPENWRT_VERSION="master" && docker compose up
Screenshots
Acknowledgement
I would like to thanks to following Open Source projects. Without these great work this container would not be possbile
Disclaimer: Security Notice
This software container is a proof of concept and has not undergone comprehensive cybersecurity assessments. Users are cautioned that potential vulnerabilities may exist, posing risks to system security and data integrity. By deploying or using this container, users accept the associated risks, and the developers disclaim any responsibility for security incidents or data breaches. A thorough security evaluation, including penetration testing and compliance checks, is strongly advised before production deployment. The software is provided without warranty, and users are encouraged to provide feedback for collaborative efforts in addressing security concerns. Users acknowledge reading and understanding this disclaimer, assuming responsibility for ensuring their environment's security.

