Docker
mongodb
docker run -d \
--name mongodb \
--restart always \
-e MONGO_INITDB_ROOT_USERNAME=mongoadmin \
-e MONGO_INITDB_ROOT_PASSWORD=123456 \
-p 27017:27017 \
mongo:4.4.18
连接串
mongodb://mongoadmin:123456@127.0.0.1:27017/?maxPoolSize=20&w=majority
postgresql
docker run -d \
--name postgres \
--restart always \
-e POSTGRES_USER=syncbyte \
-e POSTGRES_PASSWORD=123456 \
-e POSTGRES_DB=syncbyte \
-p 5432:5432 \
postgres:14.5
mysql
docker run -d \
--name mysql \
--restart always \
-e MYSQL_USER=syncbyte \
-e MYSQL_PASSWORD=123456 \
-e MYSQL_ROOT_PASSWORD=123456 \
-e MYSQL_DATABASE=syncbyte \
-v /data/mysql-data:/var/lib/mysql \
-p 3306:3306 \
mysql:8.0.28
redis
docker run -d \
--name redis \
-p 6379:6379 \
redis:6.2.10-alpine
rabbitmq
docker run -d \
--name rabbitmq \
--restart always \
-p 5672:5672 \
-p 15672:15672 \
rabbitmq:3.9-management
本文来自博客园,作者:GreeneGe,转载请注明原文链接:https://www.cnblogs.com/greene/p/17020435.html