20170601

PHP中文网
PHP中文网原创
2017-06-19 11:24:451521浏览

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:

以上是20170601的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn