说明.md 1.5 KB

docker run -p 3306:3306 --name mysql --restart=always --privileged=true \ -e MYSQL_ROOT_PASSWORD=Ayunlot123 \ -e MYSQL_DATABASE=yunlot \ -e MYSQL_USER=yunlot \ -e MYSQL_PASSWORD=yunlot123 \ -d mysql:8.1

-v /usr/local/mysql/log:/var/log/mysql \ -v /usr/local/mysql/data:/var/lib/mysql \ -v /usr/local/mysql/conf:/etc/mysql \ -v /etc/localtime:/etc/localtime:ro

##Mongodb docker run -d --restart=always -p 27017:27017 --name mongo mongo:4.4.6 --auth

                            -v /docker_volume/mongodb/data:/data/db

docker exec -it mongo mongo admin db.createUser({ user: "yunlot" , pwd: "yunlot123", roles: ["root"]})

##yunlot docker run -it --name yunlot -p 6200:6202 yunlot:latest \ --restart=always --privileged \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/bin/docker:/bin/docker

docker run --privileged --name='yunlot' -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -itd yunlot:latest bash

启动:/usr/local/redis/bin/redis-server& /usr/local/redis/redis.conf docker pull redis:latest docker run -itd --name redis -p 6379:6379 redis

/usr/local/redis

docker container run --restart=always \ -p 8379:6379 \ -v /usr/local/redis/redis.conf:/etc/redis/redis.conf \ --privileged=true \ --name myredis \ -d redis redis-server /etc/redis/redis.conf --appendonly yes

MQTT----------------------- docker pull emqx/emqx:5.0.23

docker run -d --name emqx -p 3883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx/emqx:5.0.23