1.
998 docker inspect `5b38b9da0902` |grep IPAddress
999 docker inspect '5b38b9da0902' |grep IPAddress
1000 systemctl status firewalld
1001 systemctl start firewalld
1002 systemctl status firewalld
1003 firewall-cmd --zone=public --add-port=50001/tcp --permanent
1004 firewall-cmd --reload
1005 firewall-cmd --permanent --zone=public --add-forward-port=port=8012:proto=tcp:toport=8012:toaddr=172.17.0.4
1006 firewall-cmd --list-all
1007 firewall-cmd --reload
1008 firewall-cmd --list-all
1009 firewall-cmd --permanent --zone=public --add-rich-rule='rule family=ipv4 source address=172.17.0.0/24 masquerade'
1010 firewall-cmd --reload
1011 firewall-cmd --list-all
2.
docker commit -m "centos_java_20170601" -a "****" 5b38b9da0902 centos_java_20170601:1
3.998 firewall-cmd --zone=public --add-port=30036/tcp --permanent
999 firewall-cmd --reload
1000 firewall-cmd --permanent --zone=public --add-forward-port=port=30036:proto=tcp:toport=3306:toaddr=172.17.0.3
1001 firewall-cmd --list-all
1002 firewall-cmd --reload
1003 firewall-cmd --list-all
1004 firewall-cmd --reload
1005 firewall-cmd --list-all
mysql> select user,host from mysql.user;
+-----------+-----------+
| user | host |
+-----------+-----------+
| mysql.sys | localhost |
| root | localhost |
+-----------+-----------+
2 rows in set (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '*****mysql_57' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
6.docker web manager tools:
Atas ialah kandungan terperinci 20170601. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!