docker中部署Nginx
docker pull nginx
docker exec -it c53702ad5443(容器ID 可能跟你ID 不一样) bash
docker stop c53702ad5443(容器ID) 停止容器
docker run -d -p 8090:80 docker.io/nginx
netstat -na|grep 8090
疑难巧解
Q: WARNING: IPv4 forwarding is disabled. Networking will not work.
A:
[root@localhost sysctl.d]# pwd
/usr/lib/sysctl.d
[root@localhost sysctl.d]# cat -n 00-system.conf
1 # Kernel sysctl configuration file
2 #
3 # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
4 # sysctl.conf(5) for more details.
5
6 # Disable netfilter on bridges.
7 net.bridge.bridge-nf-call-ip6tables = 0
8 net.bridge.bridge-nf-call-iptables = 0
9 net.bridge.bridge-nf-call-arptables = 0
10 net.ipv4.ip_forward=1
systemctl restart network && systemctl restart docker
posted on 2019-06-17 18:09 Indian_Mysore 阅读(131) 评论(0) 编辑 收藏 举报