Docker OpenWrt Image: Difference between revisions
Jump to navigation
Jump to search
Line 18: | Line 18: | ||
<syntaxhighlight lang="bash" enclose="div"> | <syntaxhighlight lang="bash" enclose="div"> | ||
docker exec -it CONTAINER /bin/ash | docker exec -it CONTAINER /bin/ash | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="text" enclose="div"> | |||
onfig interface 'loopback' | |||
option ifname 'lo' | |||
option proto 'static' | |||
option ipaddr '127.0.0.1' | |||
option netmask '255.0.0.0' | |||
config globals 'globals' | |||
option ula_prefix 'fd86:34c8:f9e4::/48' | |||
config interface 'lan' | |||
option type 'bridge' | |||
option ifname 'eth0' | |||
option proto 'static' | |||
option ipaddr '172.17.0.2' | |||
option netmask '255.255.0.0' | |||
option ip6assign '60' | |||
option gateway '172.17.0.1' | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 14:50, 28 December 2018
Docker OpenWrt Image
docker import https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-rootfs.tar.gz openwrt-x86-64-generic-rootfs
docker images
docker run -i openwrt-x86-64-generic-rootfs cat /etc/banner
docker run -i -t openwrt-x86-64-generic-rootfs /bin/ash
mkdir /var/lock
docker build -t openwrt-18.06.1-x86-64-generic-rootfs:latest .
docker run -d --device /dev/kmsg --tmpfs /tmp --cap-add NET_ADMIN openwrt-18.06.1-x86-64-generic-rootfs:latest
docker exec -it CONTAINER /bin/ash
onfig interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd86:34c8:f9e4::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '172.17.0.2'
option netmask '255.255.0.0'
option ip6assign '60'
option gateway '172.17.0.1'