docker 安装
sudo curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && docker --version sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": ["http://hub-mirror.c.163.com"] } EOF sudo systemctl enable docker sudo systemctl start docker sudo groupadd docker sudo gpasswd -a ${USER} docker sudo systemctl restart docker
docker 安装 mysql
docker run -d --name mysql --privileged=true -p 3306:3306 -v /home/mysql:/val/lib/mysql -e MYSQL_ROOT_PASSWORD="mysql" --restart=always mysql:5.7
树莓派(其他平台同样适用) docker 安装阿里网盘
docker run -d --name clouddrive --restart unless-stopped -p 9798:9798 --restart=always -v /home/pi/cloud/CloudNAS:/CloudNAS:shared -v /home/pi/cloud/Config:/Config -v /home/pi/cloud/shared:/media:shared --network host --privileged --device /dev/fuse:/dev/fuse cloudnas/clouddrive
docker 安装 mongodb
docker run -d --name mongodb -v /data/mongo:/data/db -p 27017:27017 --restart=always mongo
docker exec -it mongodb bash
#进入 mongo
mongo
#进入 admin 的数据库
use admin
#创建管理员用户
```bash db.createUser( { user: "root", pwd: "mongo", roles: [ { role: "root", db: "admin" } ] } )
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)