1. mongo
docker pull mongo:4.4.10
docker run -d --name mongodb -e MONGO_INITDB_ROOT_USERNAME='admin' -e MONGO_INITDB_ROOT_PASSWORD='password' -v /usr/local/mongodata:/data/mongodb -p 27017:27017 mongo:4.4.10
or
docker run -d --name mongodb -v /usr/local/mongodata:/data/mongodb -p 27017:27017 mongo:4.4.10 --auth
docker exec -it mongodb mongo
use admin
db.createUser({user: 'admin', pwd: 'password', roles: [{role: "root", db: "test"}]})
2. mongo-express
docker pull mongo-express:0.54
docker run -d --name mongo-express --link mongodb:mongo -e ME_CONFIG_MONGODB_ADMINUSERNAME='admin' -e ME_CONFIG_MONGODB_ADMINPASSWORD='password' -p 8081:8081 mongo-express:0.54
3. redis
docker pull redis:6.0
# 参考http://download.redis.io/redis-stable/redis.conf
cat > /data/redis/etc/redis.conf << EOF
protected-mode no
save 60 1
EOF
docker run -d --name redis -v /data/redis/etc:/usr/local/etc/redis -v /data/redis/data:/data -p 6379:6379 redis:6.0
4. redisinsight
docker pull redislabs/redisinsight
docker run -d --name redisinsight --link redis -p 8001:8001 redislabs/redisinsight