docker By bigsuperangel Published 2018-10-15 Contents 1. docker mysql 配置 123456789docker search mysqldocker run --name some-mysql -p 3306:3306 -v /root/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=xxx -d mysql:5.5docker image lsdocker exec -it some-mysql bash#配置远程访问mysql> grant all privileges on *.* to root@"%" identified by "password" with grant option; Query OK, 0 rows affected, 1 warning (0.04 sec)mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) 2. docker tomcat 配置 1234567891011# tomcat8 给内网服务器使用docker run --name tomcat8 -d \ -v ~/web/tomcat8/webapps:/usr/local/tomcat/webapps \ -v ~/web/tomcat8/logs:/usr/local/tomcat/logs \ -v /etc/localtime:/etc/localtime:ro \ -e TZ="Asia/Shanghai" \ -p 8080:8080 tomcat:8.0docker logs --tail=100 -f tomcat8docker container stop tomcat8docker container start tomcat8