1 mysql docker环境部署
docker pull redis
docker run --name=mysql -it -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql
mysql -h 127.0.0.1 -P 3306 -u root -p123456
2 redis docker环境部署
https://hub.docker.com/_/redis
docker pull redis
docker run --name redis -d -p 6379:6379 redis
3 mongo docker环境部署
https://hub.docker.com/_/mongo
docker pull mongo
docker run --name mongo -p 27017:27017 -v ~/dockerdata/mongo:/data/db -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=admin -d mongo
docker exec -it mongo bash
mongo -u admin -p admin