Docker常用工具
安装Portainer
#挂载宿主机目录
docker run -d --name portainer \
-p 0.0.0.0:9000:9000 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/portainer:/data \
portainer/portainer-ce:latest
#挂载数据卷
docker run -d --name portainer \
-p 0.0.0.0:9000:9000 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v /var/run/docker.sock:/var/run/docker.sock \
--mount source=portainer_vol,target=/data \
portainer/portainer-ce:latest
安装Tomcat
docker run -d --name tomcat \
-p 0.0.0.0:8080:8080 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v ~/tomcat/:/usr/local/tomcat/webapps \
registry.cn-beijing.aliyuncs.com/wulong1104/tomcat:9-jdk8-corretto
基于JDK镜像启用java程序
docker run -d --name springboot-demo \
-p 0.0.0.0:8080:8080 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v ~/springboot:/springboot \
registry.cn-beijing.aliyuncs.com/wulong1104/openjdk:8 \
'java' '-jar' '/springboot/springboot-demo.jar' '--spring.config.location=/springboot/application.yml'
安装Redis
# 无密码模式
docker run -d --name redis \
-p 0.0.0.0:6379:6379 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
redis:latest
# 有密码模式
docker run -d --name redis \
-p 0.0.0.0:6379:6379 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
redis:latest --requirepass "password"
安装nginx
docker run -d --name nginx \
--net=host --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v ~/nginx/conf:/etc/nginx/conf.d \
-v ~/nginx/html:/html \
registry.cn-beijing.aliyuncs.com/wulong1104/nginx:latest
内网测速工具
#homebox
docker run -d --name homebox \
-p 0.0.0.0:3300:3300 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
xgheaven/homebox:latest
#speedtest
docker run -d --name speedtest \
-p 0.0.0.0:3380:80 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
adolfintel/speedtest:latest
安装AList
docker run -d --name alist \
-p 0.0.0.0:5244:5244 --restart=unless-stopped \
-e PUID=0 -e PGID=0 -e UMASK=022 \
-v ~/alist/config:/opt/alist/data \
-v ~/alist/data:/mnt/data \
-v ~/alist/recycle:/mnt/recycle \
xhofe/alist:latest
安装导航面板sun-panel
docker run -d --name sun-panel \
-p 0.0.0.0:3002:3002 --restart=unless-stopped \
-e TZ="Asia/Shanghai" \
-v ~/sun-panel:/app/conf \
-v /var/run/docker.sock:/var/run/docker.sock \
hslr/sun-panel:latest