mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 16:01:29 +00:00
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
version: "3"
|
|
services:
|
|
qemu:
|
|
container_name: openwrt
|
|
#image: albrechtloh/qemu-openwrt:openwrt-23.05.3-2
|
|
#image: "openwrt-docker-arm64"
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
args:
|
|
OPENWRT_VERSION: "23.05.3"
|
|
|
|
environment:
|
|
#DEBUG: "y"
|
|
#IS_U_OS_APP: "true"
|
|
|
|
# Define number of VM CPUs
|
|
CPU_COUNT: 2
|
|
|
|
# Define which physical or virtual interfaces shall be attach direct to OpenWrt
|
|
WAN_IF: "host" # Usage of container host Ethernet connection as WAN. WARNING: Bad performace because of user space Ethernet implementation.
|
|
#WAN_IF: "none" # No WAN interface defined. This is useful if OpenWrt WAN acts a USB Wi-Fi client or as USB cellular modem
|
|
#WAN_IF: "enx00e04c0407a6" # Use this option to define a specific physical Ethernet interface
|
|
|
|
#LAN_IF: "veth" # veth pair between OpenWrt and host system
|
|
#LAN_IF: "enx00e04d68033f" # Use this option to define a specific physical Ethernet interface
|
|
|
|
# Make LuCI OpenWrt web interface accessible via host LAN
|
|
FORWARD_LUCI: "true"
|
|
|
|
# USB passthrough
|
|
# Format <vendorID>:<productID> like 'lsusb' is given
|
|
# Currently only two USB devices are supported
|
|
#USB_1: "0bda:8153"
|
|
#USB_2: "0e8d:7961"
|
|
|
|
ports:
|
|
# Port 8006 is console tty web VNC
|
|
- 8006:8006
|
|
# Port 8000 is available only when Docker WAN network is used.
|
|
# Use script /usr/bin/fw_wan_open_http to open the port
|
|
- 8000:8000
|
|
# SSH
|
|
# Use script /usr/bin/fw_wan_open_ssh to open the port
|
|
- 8022:8022
|
|
stop_grace_period: 2m
|
|
restart: on-failure
|
|
|
|
# The following settings are mandantory to run the container
|
|
devices:
|
|
- /dev/kvm
|
|
device_cgroup_rules:
|
|
- 'c *:* rwm'
|
|
cap_add:
|
|
- NET_ADMIN
|
|
pid: "host"
|
|
privileged: true
|
|
volumes:
|
|
- /dev:/dev/
|
|
- data:/storage/
|
|
|
|
volumes:
|
|
data:
|