docker restart $(docker ps -f "status=exited" -q)
Category Archives: Linux
Protected: 漏網之魚
Protected: Server IP of Softether in Japan
Grab the gateway of ppp0
OLDGW=`route -n | grep "ppp0" | awk -F: '{print $1}' | grep "UH" | awk '{print $1}'`
Install Munin using docker
docker run -dit --restart unless-stopped -p 8080:80 -e TZ="Asia/Hong_Kong" -e NODES="1867:172.17.0.1" occitech/munin:latest
Set CentOS 7 as a router
firewall-cmd --add-masquerade --permanent sudo firewall-cmd --reload firewall-cmd --add-port=port-number/port-type
- Make the new settings persistent:
$ sudo firewall-cmd --runtime-to-permanent
Reference: https://linuxhint.com/centos7_router/
Change to use a free jsdelivr
cd /www/wwwroot/ && find -type f -name "*.tpl" | xargs sed -i 's/jsdelivr.example.com/cdn.jsdelivr.net/'
How to install ntop
docker run -dit --restart unless-stopped -p 3000:3000 -v $(pwd)/ntopng.license:/etc/ntopng.license:ro --net=host ntop/ntopng:latest -i eth0 docker run -dit --cpuset-cpus="2" --restart unless-stopped -p 3000:3000 -v $(pwd)/ntopng.license:/etc/ntopng.license:ro --net=host ntop/ntopng:latest -i eth0 -i eth1 -i tap_biz
How to copy docker image from a host to another one
docker save -o <path for generated tar file> <image name>
docker load -i <path to copied image file>
Docker can’t be started: Error initializing network controller: list bridge addresses failed
Solution:
Create docker network interface manually using the following commands:
ip link add name docker0 type bridge
ip addr add dev docker0 172.x.y.z/16