1、Redis
#创建容器
#!/usr/bin/env bash
Data_File="/data/disk/redis/"
Password="Win@2008"
docker run --name redis-server \
--restart=always \
-p 6379:6379 \
-v ${Data_File}:/data \
-d redis:latest \
redis-server --appendonly yes \
--requirepass "${Password}"
#查看
docker exec -it redis-server redis-cli -h 127.0.0.1 -p 6379 -a 'password'
2、Mysql5.7
#创建容器
#!/usr/bin/env bash
Data_File="/data/docker/mysql/"
Password="admin888"
Name="mysql57"
Version="5.7"
docker run --name ${Name} \
-p 3306:3306 \
--restart always \
-e MYSQL_ROOT_PASSWORD=${Password} \
-v ${Data_File}conf:/etc/mysql/mysql.conf.d \
-v ${Data_File}data:/var/lib/mysql \
-v ${Data_File}logs:/var/log/mysql \
-d mysql:${Version}
#查看
docker exec -it 3d88adc562cc mysql -uroot -p
#导入数据
docker exec -i 3d88adc562cc mysql -uaaaa -p aaaa <aaaa.sql
#安装MySQL Client
#ubuntu
apt install mysql-client
#Centos
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum install -y mysql-community-client
3、Memcached
#创建容器
docker run --name memcached --restart always -p 11211:11211 -d memcached
4、Rancher测试环境
#创建容器
docker run --restart=unless-stopped -d -p 80:80 -p 443:443 -v /data/docker/data/rancher-cp:/var/lib/rancher --name rancher-cp rancher/rancher:v2.1.0
5、PPT文件转换
#创建容器
docker run -d -p 80:3000 --name docker pull bbhsky/pdf-converter
#使用方法
curl --form file=@myfile.docx http://localhost/unoconv/pdf > myfile.pdf
#写入变量启动
SERVER_PORT=3000 #端口
PAYLOAD_MAX_SIZE=104857600 #文件大小 100M
TIMEOUT_SERVER=120000 #转码超时时间
TIMEOUT_SOCKET=140000 #上传文件超时
docker run --env-file=docker.env -d -p 80:3000 --name docker pull bbhsky/pdf-converter
6、Nexus3仓库管理
docker run –d --name=Nexus3 --restart=always -p 8081:8081 -p 8088:8088 –v /home/rancher/nexus-data:/nexus-data sonatype/nexus:3
7、PHPMyAdmin
docker run --name panel-phpmyadmin -d --link mysql:db -p 8080:80 phpmyadmin/phpmyadmin
8、PostgreSQL:
docker run -d \
--name some-postgres \
-p 5432:5432\
-e POSTGRES_PASSWORD=windows2008 \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v /data/postgresql:/var/lib/postgresql/data \
postgres
9、安装Jenkins
11、安装浏览器
#!/usr/bin/env bash
docker run -d \
--name chrome-novnc \
--restart=always \
-p 5900:5900 \
-p 8083:8083 \
oldiy/chrome-novnc:latest
#给VNC加密码
docker exec -it chrome-novnc bash
#设置密码
x11vnc -storepasswd
#按两次y
apt update
apt install vim -y
vim /etc/supervisor/conf.d/supervisord.conf
#如下图所示位置添加
-rfbauth /root/.vnc/passwd
12、安装emby
#!/usr/bin/env bash
Data_File="/data/disk/emby"
Docker_images_name="emby"
Images_version="emby/embyserver:4.7.12.0"
docker pull ${Images_version}
docker rm -f ${Docker_images_name}
docker run -d --name ${Docker_images_name} \
--restart always \
-v ${Data_File}/config:/config \
-v ${Data_File}/video:/video \
--device=/dev/dri:/dev/dri \
--add-host=api.themoviedb.org:52.84.18.87 \
--add-host=image.tmdb.org:84.17.46.53 \
--add-host=www.themoviedb.org:52.84.125.129 \
--network host \
${Images_version}
13、安装nas-tools
#!/usr/bin/env bash
Data_File="/data/disk/nas-tools"
Docker_images_name="nas-tools"
Images_version="nastool/nas-tools:latest"
docker pull ${Images_version}
docker rm -f ${Docker_images_name}
docker run -d --name ${Docker_images_name} \
--hostname ${Docker_images_name} \
--restart always \
-p 3000:3000 \
-v ${Data_File}/config:/config \
-v ${Data_File}/media:/media \
-e PUID=0 \
-e PGID=0 \
-e UMASK=000 \
-e NASTOOL_AUTO_UPDATE=false \
-e NASTOOL_CN_UPDATE=false \
${Images_version}
14、安装portainer汉化版
#!/usr/bin/env bash
Data_File="/data/disk/portainer"
Docker_images_name="portainer-zh"
Images_version="6053537/portainer-ce:latest"
docker pull ${Images_version}
docker rm -f ${Docker_images_name}
docker run -d --name ${Docker_images_name} \
--restart=always \
-p 9000:9000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${Data_File}/data:/data \
${Images_version}
15、安装qbittorrent
#!/usr/bin/env bash
Data_File="/data/disk/qbittorrent"
Docker_images_name="qbittorrent"
Images_version="linuxserver/qbittorrent:latest"
docker pull ${Images_version}
docker rm -f ${Docker_images_name}
docker run -d --name ${Docker_images_name} \
--restart=always \
-v ${Data_File}/config:/config \
-v ${Data_File}/downloads:/downloads \
--network host \
${Images_version}
#如果报错:/usr/bin/qbittorrent-nox: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory
apt update
apt install binutils
strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
exit