好用的Docker应用汇总

远望世界工具Docker大约 9 分钟

本文收集一些在用的或者看起来好用的Docker应用

一、安装环境

二、应用汇总

zerotier

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  zerotier:
    image: zerotier/zerotier
    container_name: zerotier
    restart: unless-stopped
    privileged: true
    network_mode: host
    volumes:
      - ./data:/var/lib/zerotier-one
    devices:
      - /dev/net/tun
    environment:
      TZ: Asia/Shanghai
    cap_add:
      - NET_ADMIN
      - SYS_ADMIN
    command: ["你的网络ID"]

watchtower(自动更新容器)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: unless-stopped
    network_mode: host
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      TZ: Asia/Shanghai

nginx-web-ui

镜像地址open in new window 教程地址open in new window
首次登录初始化管理员账号密码

version: "3"
services:
  nginx-web-ui:
    image: cym1102/nginxwebui
    container_name: nginx-web-ui
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./data:/home/nginxWebUI
      - ./www:/www
    environment:
      TZ: Asia/Shanghai
      BOOT_OPTIONS: "
      --server.port=8080 
      --spring.database.type=mysql 
      --spring.datasource.url=jdbc:mysql://172.17.0.1:3306/nginx-web-ui 
      --spring.datasource.username=root 
      --spring.datasource.password=password "

portainer-ce汉化版

镜像地址open in new window 教程地址open in new window
首次登录初始化管理员账号密码

version: "3"
services:
  portainer-ce:
    image: 6053537/portainer-ce
    container_name: portainer-ce
    restart: unless-stopped
    ports:
      - 9000:9000
    volumes:
      - ./data:/data
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      TZ: Asia/Shanghai

gitea

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  gitea:
    image: gitea/gitea
    container_name: gitea
    restart: unless-stopped
    ports:
      - 3000:3000
    volumes:
      - ./data:/data
    environment:
      TZ: Asia/Shanghai
      USER_UID: 1000
      USER_GID: 1000

gogs

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  gogs:
    image: gogs/gogs
    container_name: gogs
    restart: unless-stopped
    ports:
      - 3000:3000
    volumes:
      - ./data:/data
    environment:
      TZ: Asia/Shanghai

x-ui

镜像地址open in new window
默认账号密码: admin/admin

version: "3"
services:
  xui:
    image: enwaiax/x-ui
    container_name: x-ui
    restart: unless-stopped
    ports:
      - 54321:54321
      - 12345:12345
    volumes:
      - ./data:/etc/x-ui
    environment:
      TZ: Asia/Shanghai

jenkins

镜像地址open in new window 教程地址open in new window

version: "3"
services:                                      # 集合
  jenkins:
    image: jenkins/jenkins                     # 指定服务所使用的镜像
    container_name: jenkins                    # 容器名称
    restart: unless-stopped                            # 重启方式
    user: root                                 # 为了避免一些权限问题 在这我使用了root
    ports:                                     # 对外暴露的端口定义
      - 8080:8080                              # 访问Jenkins服务端口
      - 50000:50000
    volumes:                                   # 卷挂载路径
      - ./data:/var/jenkins_home               # 这是我们一开始创建的目录挂载到容器内的jenkins_home目录
      - /usr/bin/docker:/usr/bin/docker        # 这是为了我们可以在容器内使用docker命令
      - /var/run/docker.sock:/var/run/docker.sock
      - /usr/local/bin/docker-compose:/usr/local/bin/docker-compose
    environment:
      TZ: Asia/Shanghai
      JAVA_OPTS: "-server -Xms1024m -Xmx1024m -Xmn512m"

minio(单机部署)

镜像地址open in new window 旧版教程open in new window 新版教程open in new window

version: "3"
services:
  minio:
    image: minio/minio:RELEASE.2021-06-17T00-10-46Z
    container_name: minio
    restart: unless-stopped
    ports:
      - 9000:9000
    volumes:
      - ./config:/root/.minio
      - ./data:/data
    environment:
      TZ: Asia/Shanghai
      MINIO_ROOT_USER: minio
      MINIO_ROOT_PASSWORD: password
    command: server /data

mysql

镜像地址open in new window 教程地址open in new window 内存优化open in new window

version: "3"
services:
  mysql:
    image: mysql
    container_name: mysql
    restart: unless-stopped
    ports:
      - 3306:3306
    volumes:
      - ./config/my.cnf:/etc/mysql/my.cnf
      - ./data:/var/lib/mysql
    environment:
      TZ: Asia/Shanghai
      MYSQL_ROOT_PASSWORD: password
    command:
      --max_connections=1000
      --character-set-server=utf8mb4
      --collation-server=utf8mb4_general_ci
      --default-authentication-plugin=mysql_native_password

redis

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  redis:
    image: redis
    container_name: redis
    restart: unless-stopped
    ports:
      - 6379:6379
    volumes:
      - ./config/redis.conf:/etc/redis/redis.conf
      - ./data:/data
    environment:
      TZ: Asia/Shanghai
    command: redis-server /etc/redis/redis.conf

httpd

镜像地址open in new window

version: "3"
services:
  httpd1:
    image: httpd
    container_name: httpd1
    restart: unless-stopped
    ports:
      - 8080:80
    volumes:
      - ./data/web1:/usr/local/apache2/htdocs/
    environment:
      TZ: Asia/Shanghai

frps

镜像地址open in new window 参考配置open in new window

version: "3"
services:
  frps:
    image: snowdreamtech/frps
    container_name: frps
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./config/frps.toml:/etc/frp/frps.toml
    environment:
      TZ: Asia/Shanghai

frpc

镜像地址open in new window 参考配置open in new window

version: "3"
services:
  frpc:
    image: snowdreamtech/frpc
    container_name: frpc
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./config/frpc.toml:/etc/frp/frpc.toml
    environment:
      TZ: Asia/Shanghai

alist(预装aria2)

镜像地址open in new window 教程地址open in new window
获取初始账号密码: 在宿主机执行docker exec -it 容器ID bash进入容器, 执行./alist admin set your_password手动设置密码

version: "3"
services:
  alist:
    image: xhofe/alist-aria2
    container_name: alist
    restart: unless-stopped
    ports:
      - 5244:5244
      - 6800:6800
    volumes:
      - ./data:/opt/alist/data
      - ./mydata:/mydata
    environment:
      TZ: Asia/Shanghai
      PUID: 0
      PGID: 0
      UMASK: 022

rocketmq(单机部署)

镜像地址open in new window 教程地址open in new window 配置文件解释open in new window

version: "3"
services:
  rocketmq-namesrv:
    image: rocketmqinc/rocketmq
    container_name: rocketmq-namesrv
    restart: unless-stopped
    ports:
      - 9876:9876
    volumes:
      - ./data/namesrv/logs:/home/rocketmq/logs
      - ./data/namesrv/store:/home/rocketmq/store
    environment:
      TZ: Asia/Shanghai
      JAVA_OPT_EXT: "-Duser.home=/home/rocketmq -Xms512M -Xmx512M -Xmn128m"
    command: [ "sh","mqnamesrv" ]

  rocketmq-broker:
    image: rocketmqinc/rocketmq
    container_name: rocketmq-broker
    restart: unless-stopped
    ports:
      - 10909:10909
      - 10911:10911
    volumes:
      - ./config/broker.conf:/etc/rocketmq/broker.conf
      - ./data/broker/logs:/home/rocketmq/logs
      - ./data/broker/store:/home/rocketmq/store
    environment:
      TZ: Asia/Shanghai
      JAVA_OPT_EXT: "-Duser.home=/home/broker -Xms512M -Xmx512M -Xmn128m"
    command: [ "sh","mqbroker","-c","/etc/rocketmq/broker.conf","-n","rocketmq-namesrv:9876","autoCreateTopicEnable=true" ]
    depends_on:
      - rocketmq-namesrv

  rocketmq-console:
    image: styletang/rocketmq-console-ng
    container_name: rocketmq-console
    restart: unless-stopped
    ports:
      - 8080:8080
    volumes:
      - ./data/console:/tmp
    environment:
      TZ: Asia/Shanghai
      JAVA_OPTS: "-Drocketmq.namesrv.addr=rocketmq-namesrv:9876 -Dcom.rocketmq.sendMessageWithVIPChannel=false -Xms512M -Xmx512M -Xmn128m"
    depends_on:
      - rocketmq-namesrv

verdaccio(npm私服)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  verdaccio:
    image: verdaccio/verdaccio
    container_name: verdaccio
    restart: unless-stopped
    ports:
      - 3005:3005
    volumes:
      - ./data/conf:/verdaccio/conf
      - ./data/plugins:/verdaccio/plugins
      - ./data/storage:/verdaccio/storage
    environment:
      TZ: Asia/Shanghai
      VERDACCIO_PORT: 3005
      VERDACCIO_USER_NAME: root

nexus(maven私服)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  nexus:
    image: sonatype/nexus3
    container_name: nexus
    restart: unless-stopped
    ports:
      - 8081:8081
    volumes:
      - ./data:/nexus-data
    environment:
      TZ: Asia/Shanghai

nacos

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  nacos:
    image: nacos/nacos-server:v2.1.1
    container_name: nacos
    restart: unless-stopped
    ports:
      - 8848:8848
      - 9848:9848
      - 9849:9849
    volumes:
      - ./logs/:/home/nacos/logs
    environment:
      TZ: Asia/Shanghai
      MODE: standalone
      SPRING_DATASOURCE_PLATFORM: mysql
      MYSQL_SERVICE_HOST: 172.17.0.1
      MYSQL_SERVICE_PORT: 3306
      MYSQL_SERVICE_USER: root
      MYSQL_SERVICE_PASSWORD: password
      MYSQL_SERVICE_DB_NAME: nacos
      MYSQL_SERVICE_DB_PARAM: characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
      JVM_XMS: 512m
      JVM_XMX: 512m
      JVM_XMN: 256m
      JVM_MS: 512m
      JVM_MMS: 512m

vsftpd(ftp)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  vsftpd:
    image: fauria/vsftpd
    container_name: vsftpd
    restart: unless-stopped
    ports:
      - 20:20
      - 21:21
      - 21100-21200:21100-21200
    volumes:
      - ./data:/home/vsftpd
      - ./logs/vsftpd.log:/var/log/vsftpd.log
    environment:
      TZ: Asia/Shanghai
      FTP_USER: root
      FTP_PASS: password
      PASV_MIN_PORT: 21100
      PASV_MAX_PORT: 21200

code-server

镜像地址open in new window github地址open in new window

version: "3"
services:
  code-server:
    image: lscr.io/linuxserver/code-server
    container_name: code-server
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./data:/config
    environment:
      TZ: Asia/Shanghai
      PUID: 1000
      PGID: 1000
      PASSWORD: your_password
      SUDO_PASSWORD: your_password

lychee(瀑布流相册)

镜像地址open in new window github地址open in new window

version: "3"
services:
  lychee:
    image: lycheeorg/lychee
    container_name: lychee
    restart: unless-stopped
    ports:
      - 8080:80
    volumes:
      - ./config:/conf
      - ./sym:/sym
      - ./data:/uploads
    environment:
      TZ: Asia/Shanghai
      PUID: 1000
      PGID: 1000
      DB_CONNECTION: sqlite

lsky-pro(兰空图床)

镜像地址open in new window github地址open in new window

version: "3"
services:
  lsky-pro:
    image: halcyonazure/lsky-pro-docker
    container_name: lsky-pro
    restart: unless-stopped
    ports:
      - 8089:8089
    volumes:
      - ./data:/var/www/html
    environment:
      TZ: Asia/Shanghai
      WEB_PORT: 8089

easyimage(简单图床)

镜像地址open in new window github地址open in new window

version: "3"
services:
  easyimage:
    image: ddsderek/easyimage:latest
    container_name: easyimage
    restart: unless-stopped
    ports:
      - 8080:80
    volumes:
      - ./config:/app/web/config
      - ./data:/app/web/i
    environment:
      TZ: Asia/Shanghai
      PUID: 1000
      PGID: 1000
      DEBUG: false

vocechat(在线聊天室)

镜像地址open in new window 官方文档open in new window

version: "3"
services:
  vocechat:
    image: privoce/vocechat-server
    container_name: vocechat
    restart: unless-stopped
    ports:
      - 3000:3000
    volumes:
      - ./data:/home/vocechat-server/data
    environment:
      TZ: Asia/Shanghai

uptime-kuma(开源监控工具)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  uptime-kuma:
    image: louislam/uptime-kuma
    container_name: uptime-kuma
    restart: unless-stopped
    ports:
      - 3001:3001
    volumes:
      - ./data:/app/data
    environment:
      TZ: Asia/Shanghai

docker-registry(docker仓库)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  docker-registry:
    image: registry
    container_name: docker-registry
    restart: unless-stopped
    ports:
      - 5000:5000
    volumes:
      - ./data:/var/lib/registry
    environment:
      TZ: Asia/Shanghai

rustdesk-server(RustDesk远程桌面服务端)

镜像地址open in new window github地址open in new window

version: "3"
services:
  rustdesk-server:
    image: rustdesk/rustdesk-server-s6
    container_name: rustdesk-server
    restart: unless-stopped
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
      - 21117:21117
      - 21118:21118
      - 21119:21119
    volumes:
      - ./data:/data
    environment:
      TZ: Asia/Shanghai
      RELAY: rustdesk.example.com:21117
      ENCRYPTED_ONLY: 1

dosgame(DOS游戏)

镜像地址open in new window github地址open in new window

version: "3"
services:
  dosgame:
    image: oldiy/dosgame-web-docker
    container_name: dosgame
    restart: unless-stopped
    ports:
      - 262:262
    environment:
      TZ: Asia/Shanghai

kuboard(k8s可视化面板)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  kuboard:
    image: eipwork/kuboard:v3
    container_name: kuboard
    restart: unless-stopped
    ports:
      - 8090:80
      - 10081:10081
    volumes:
      - ./data:/data
    environment:
      TZ: Asia/Shanghai
      KUBOARD_ENDPOINT: "http://ip:8090"
      KUBOARD_AGENT_SERVER_TCP_PORT: "10081"

kubepi(k8s可视化面板)

镜像地址open in new window 官方文档open in new window

version: "3"
services:
  kubepi:
    image: 1panel/kubepi
    container_name: kubepi
    restart: unless-stopped
    privileged: true
    ports:
      - 8080:80
    environment:
      TZ: Asia/Shanghai

rainbond(云原生平台)

教程地址open in new window

version: "3"
services:
  rainbond:
    image: registry.cn-hangzhou.aliyuncs.com/goodrain/rainbond:v5.15.0-release-allinone
    container_name: rainbond
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./.ssh:/root/.ssh
      - ./data:/app/data
    environment:
      TZ: Asia/Shanghai

hnet-web(在线网页代理)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  hnet-web:
    image: stilleshan/hideipnetwork-web
    container_name: hnet-web
    restart: unless-stopped
    ports:
      - 56559:56559
    environment:
      TZ: Asia/Shanghai

memos(备忘录)

镜像地址open in new window github地址open in new window

version: "3"
services:
  memos:
    image: neosmemo/memos:latest
    container_name: memos
    restart: unless-stopped
    ports:
      - 5230:5230
    volumes:
      - ./data:/var/opt/memos
    environment:
      TZ: Asia/Shanghai

neko(neko远程浏览器)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  neko:
    image: m1k1o/neko:firefox
    container_name: neko
    restart: "unless-stopped"
    shm_size: "2gb"
    ports:
      - 8080:8080
      - 52000-52100:52000-52100/udp
    cap_add:
      - SYS_ADMIN
    environment:
      TZ: Asia/Shanghai
      NEKO_SCREEN: '1920x1080@60'
      NEKO_PASSWORD: neko
      NEKO_PASSWORD_ADMIN: admin
      NEKO_EPR: 52000-52100
      NEKO_NAT1TO1: 127.0.0.1
      NEKO_FILE_TRANSFER_ENABLED: true

lobe-chat(开源的高性能聊天机器人框架)

镜像地址open in new window github地址open in new window

version: "3"
services:
  lobe-chat:
    image: lobehub/lobe-chat
    container_name: lobe-chat
    restart: unless-stopped
    ports:
      - 8080:3210
    environment:
      TZ: Asia/Shanghai
      OPENAI_API_KEY: your-key
      ACCESS_CODE: your-password
      OPENAI_PROXY_URL: your-api-url

chatgpt-next-web(跨平台ChatGPT应用)

镜像地址open in new window 教程地址open in new window

version: "3"
services:
  chatgpt:
    image: yidadaa/chatgpt-next-web
    container_name: chatgpt
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      TZ: Asia/Shanghai
      OPENAI_API_KEY: your-key
      CODE: your-password
      BASE_URL: your-api-url

pairdrop(在线文件传输)

镜像地址open in new window github地址open in new window

version: "3"
services:
  pair-drop:
    image: lscr.io/linuxserver/pairdrop
    container_name: pair-drop
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      TZ: Asia/Shanghai
      PUID: 1000
      PGID: 1000
      RATE_LIMIT: false
      WS_FALLBACK: false

it-tools(开发者工具箱)

镜像地址open in new window github地址open in new window

version: "3"
services:
  it-tools:
    image: qingfeng2336/it-tools
    container_name: it-tools
    restart: unless-stopped
    ports:
      - 8080:80
    environment:
      TZ: Asia/Shanghai

filecodebox(文件快递柜)

镜像地址open in new window github地址open in new window

version: "3"
services:
  file-code-box:
    image: lanol/filecodebox:beta
    container_name: file-code-box
    restart: unless-stopped
    ports:
      - 1014:12345
    volumes:
      - ./data:/app/data
    environment:
      TZ: Asia/Shanghai
上次编辑于: