portainer

docker volume create portainer_data
docker run --name portainer \
           --restart=always \
           -p 8000:8000 -p 9000:9000 \
           -v /var/run/docker.sock:/var/run/docker.sock \
           -v portainer_data:/data \
           -d portainer/portainer:latest

postgresql

docker volume create postgresql-v12_data
docker run --name postgres-v12 \
           --restart=always \
           -p 5432:5432 \
           -e POSTGRES_PASSWORD=password \
           -v postgresql-v12_data:/var/lib/postgresql/data \
           -d postgres:12

pgadmin4

docker run -p 80:80 \
    --restart=always \
    --name pgadmin4 \
    -e "PGADMIN_DEFAULT_EMAIL=user@domain.com" \
    -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \
    -d dpage/pgadmin4:latest

redis

docker volume create redis_data
docker run --restart=always \
           --name redis \
           -p 6379:6379 \
           -v /[path]/conf/redis.conf:/[path]/redis/redis.conf \
           -v redis_data:/data \
           -d redis:latest

gogs

docker volume create gogs_data
docker run --name gogs \
           --restart=always \
           -p 3000:3000 \
           -v gogs_data:/data \
           -d gogs/gogs:latest

softethervpn, --cap-add NET_ADMIN

docker run --name=softether\
    --cap-add NET_ADMIN \
    -p 500:500/udp \
    -p 4500:4500/udp \
    -p 1701:1701/tcp \
    -p 1194:1194/udp \
    -p 5555:5555/tcp \
    -e SPW=ServerManagementPassword \
    -e HPW=HubManagementPassword \
    -d siomiz/softethervpn:latest

emqx

docker run --restart=always \
        --name emqx \
        -p 18083:18083 \
        -p 8083:8083 \
        -p 1883:1883 \
        -d emqx/emqx:latest

docker run --restart=always \
        --name emqx-edge \
        -p 18084:18083 \
        -p 8883:8083 \
        -p 18833:1883 \
        -d emqx/emqx-edge:latest

mosquitto

# mosquitto.conf
# - [host-path]/mosquitto/config:/mosquitto/config

docker volume create mosquitto_data
docker volume create mosquitto_log
docker run --restart=always \
        --name mosquitto\
        -p 9001:9001\
        -p 1883:1883 \
        -v mosquitto_data:/mosquitto/data \
        -v mosquitto_log:/mosquitto/log \
        -v /[host-path]/mosquitto/config:/mosquitto/config \
        -d eclipse-mosquitto:latest

vjiot mqttd

docker build -t vjiot/mqttd_aedes-express:v1.3 ./mqttd_aedes-express

docker run --name mqttd_aedes-espress \
  --restart=always \
  -p 1883:1883 \
  -p 1884:1884 \
  -p 8880:8880 \
  -v <host path>:/app/vjiot/mqttd \
  -v /etc/localtime:/etc/localtime \
  -d vjiot/mqttd_aedes-express:v1.3

keycloak

docker volume create keycloak_data
docker run --restart=always \
    --name keycloak \
    -e KEYCLOAK_USER=<USERNAME> \
    -e KEYCLOAK_PASSWORD=<PASSWORD> \
    -p 8080:8080 \
    -v keycloak_data:/data \
    -d jboss/keycloak:latest

# database, no volumes
docker run --restart=always \
    --name keycloak \
    -e KEYCLOAK_USER=<USERNAME> \
    -e KEYCLOAK_PASSWORD=<PASSWORD> \
    -e DB_VENDOR=<database type> \
    -e DB_ADDR=<ip> \
    -e DB_PORT=<port> \
    -e DB_DATABASE=<database name> \
    -e DB_USER=<keycloak> \
    -e DB_PASSWORD=<password> \
    -p 8080:8080 \
    -d jboss/keycloak:latest

haproxy

docker run --restart=always \
    --name haproxy \
    -p 2018:2018 \
    -p 2019:2019 \
    -v /etc/[default]/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg \
    -d haproxy:latest

haproxy.cfg

frontend secure         #自定义一个frontend,也可以放在listen或者backend中
    mode http
    bind  0.0.0.0:8901  #监听的ip端口号
    stats enable        #开关
    stats uri  /        #访问的uri   ip:8888/admin?admin
    stats hide-version  #隐藏HAProxy的版本号
    stats admin if TRUE #管理界面,如果认证成功了,可通过webui管理节点
    stats refresh  30s  #统计页面自动刷新时间
    timeout client  120000

listen test1
    bind 0.0.0.0:2018
    mode tcp
    option tcplog
    timeout connect 5000
    timeout client  120000
    timeout server  120000
    #maxconn 4086
    #log 127.0.0.1 local0 debug
    server s1 127.0.0.1:2018

caddy

docker run --restart=always \
    --name caddy\
    -p 2015:2015\
    -v /srv/www:/<path>/caddy/www \
    -d abiosoft/caddy:latest

nodejs/PM2

openwrt, 安装 softether,n2n
--cap-add NET_ADMIN

docker run --name=openwrt\
    --cap-add NET_ADMIN \
    -p 8080:80/tcp \
    -p 5555:5555/tcp \
    -p 5556:5556/udp \
    -d openwrtorg/rootfs:x86-64-19.07.2 

# ntop-n2n, edge tun enable `--cap-add NET_ADMIN`
mkdir /dev/net -pv
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun

标签: none

添加新评论