Docker 容器快速启动命令| Container Quick Start Command
Docker 容器快速启动命令| Container Quick Start Command
保存一下用过的容器快速启动命令
放到了 GitHub 上面, https://github.com/orangejx/container_quick_start_command
BilibiliTask
docker run -d --name "Bilibili-Task" -e BILI_JCT=testtesttesttest -e DEDEUSERID=1000000 -e SESSDATA=testtesttesttest timmyovo/bilibilitask
Halo
- Create Docker Volume:
docker volume create halo_data
- Quick Start Zerotier Container
docker run -it -d --name Halo -p 8090:8090 -v halo_data:/root/.halo --link MariaDB:db --restart=always halohub/halo:1.4.7
- Install Halo
Database Host must be
db
Jellyfin
docker run -d --name Jellyfin --restart=always -p 10.12.1.2:1900:1900/udp -p 10.12.1.2:8096:8096/tcp -p 10.12.1.2:8920:8920/tcp -h Jellyfin -v TDJellyfinCache:/cache -v TDJellyfinConfig:/config -v TDJellyfinData:/media -v NASMountJellyfin:/media/NAS jellyfin/jellyfin
KMS Server
docker run -d --name KMS --restart=always -p 10.12.1.1:1688:1688/tcp -h KMS luodaoyi/kms-server
Kcptun Client
Create Docker Volume
if you already crate the same volume, u can skip this step.
docker volume create kcptun_data
Crate Config File & Paste Config Value
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16{
"localaddr": ":29900",
"remoteaddr": "1.1.1.1:29900",
"key": "this_is_test_kcptun_key",
"crypt": "none",
"mode": "fast3",
"mtu": 1350,
"sndwnd": 1024,
"rcvwnd": 512,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": true,
"quiet": false,
"tcp": false
}- create config file:
touch /var/lib/docker/volumes/kcptun_data/_data/client.json
- paste config value to config file.
- create config file:
Quick Start KcpTun Server Container
docker run -d --name KcptunClient -p 29900:29900 -v kcptun_data:/data --restart=unless-stopped xtaci/kcptun:v20210103 client -c /data/client.json
Kcptun Server
- Create Docker Volume
docker volume create kcptun_data
- Crate Config File & Paste Config Value
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16{
"listen": ":29900",
"target": "172.17.0.1:30936",
"key": "this_is_test_kcptun_key",
"crypt": "none",
"mode": "fast3",
"mtu": 1350,
"sndwnd": 512,
"rcvwnd": 1024,
"datashard": 10,
"parityshard": 3,
"dscp": 0,
"nocomp": true,
"quiet": false,
"tcp": false
}- create config file:
touch /var/lib/docker/volumes/kcptun_data/_data/server.json
- paste config value to config file.
- create config file:
- Quick Start KcpTun Server Container
docker run -d --name KcptunServer -p 29900:29900/udp -v kcptun_data:/data --restart=unless-stopped xtaci/kcptun:v20210103 server -c /data/server.json
Live-Torrent
docker run --name live-torrent -d -p 10.12.1.1:8085:8080 -e OSUA:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36" davenchy/live-torrent
MariaDB
- Create Docker Volume
docker volume create mariadb_data
- Quick Start MariaDB Container
docker run --name MariaDB -v mariadb_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="SngS67tMSxjJbiACcDXPttyi8jFnzav7" -p 127.0.0.1:3306:3306 -d mariadb:10.5.8 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
NextCloud
The MySQL database used in this example comes from the MariaDB container.
- Create Docker Volume
docker volume create nextcloud_data
- Quick Start NextCloud Container
docker run -d --name NextCloud --link MariaDB:db -e SMTP_HOST:smtp.qiye.aliyun.com -e SMTP_NAME:test@test.com -e SMTP_PASSWORD:"this_is_test_smtp_password" -e SMTP_SECURE:ssl -e SMTP_AUTHTYPE:login -e SMTP_PORT:465 -e MAIL_DOMAIN:test.com -e MAIL_FROM_ADDRESS:"test@test.com" -e MYSQL_HOST:db -e MYSQL_DATABASE:nextcloud -e MYSQL_USER:nextcloud -e MYSQL_PASSWORD:"this_is_test_mysql_password" -e NEXTCLOUD_ADMIN_USER:this_is_test_nc_admin_username -e NEXTCLOUD_ADMIN_PASSWORD:this_is_test_nc_admin_password -e TRUSTED_PROXIES:"10.0.0.0/8 172.16.0.0/12 192.168.0.0/16" -e REDIS_HOST:172.17.0.1 -e REDIS_HOST_PORT:6379 -v nextcloud_data:/var/www/html -p 8083:80 nextcloud
PHPMyAdmin
the environment variable
MYSQL_ROOT_PASSWORD
must be consistent with those in the MariaDB container.
docker run --name PHPMyAdmin -d --link MariaDB:db -e MYSQL_ROOT_PASSWORD="SngS67tMSxjJbiACcDXPttyi8jFnzav7" -p 8082:80 --hostname=PHPMyAdmin --restart=always phpmyadmin:5.0.4
PlexMediaServer
docker run -d --name PlexMediaServer --restart=always -p 10.12.1.1:1900:1900/udp -p 10.12.1.1:32410-32414:32410-32414/udp -p 10.12.1.1:3005:3005/tcp -p 10.12.1.1:8324:8324/tcp -p 10.12.1.1:32400:32400/tcp -p 10.12.1.1:32469:32469/tcp -e TZ="Asia/Shanghai" -e PLEX_CLAIM="claim-this-is-test-plex-claim" -e ADVERTISE_IP="http://10.12.1.1:32400" -e PLEX_UID="1001" -e PLEX_GID="1001" -e CHANGE_CONFIG_DIR_OWNERSHIP="False" -e ALLOWED_NETWORKS="172.16.0.0/12" -h Oras -v TDPMS:/config -v TDPMS:/transcode -v TDPMSData:/data -v NASMountPMS:/data/NAS plexinc/pms-docker
Portainer CE
- Create Docker Volume
docker volume create portainer_data
- Quick Start Portainer CE Container
docker run -d -p 8000:8000 -p 9000:9000 --name=Portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
Redis
- Create Docker Volume
docker volume create redis_data
- Quick Start Redis Container
docker run -d --name=Redis -p 127.0.0.1:6379:6379 --restart=unless-stopped -v redis_data:/data redis:6.2.1
SmartDNS
Only the
/smartdns/smartdns.conf
file is valid inghostry/smartdns
of Docker.
- Command:
docker run -d --name smartdns -p 10.12.1.1:53:53 -p 10.12.1.1:53:53/udp -e TZ=Asia/Shanghai -v smartdns_data:/smartdns --restart=unless-stopped ghostry/smartdns:v2020.09.08
Transmission
docker run -d --name "Transmission" --restart=always -p "10.12.1.1:51413":51413/udp -p "10.12.1.1:51413":51413/tcp -p "10.12.1.1:9091":9091/tcp -h "OrasTransmission" -e TZ:"Asia/Shanghai" -e "TRANSMISSION_WEB_HOME":"/transmission-web-control" -e "USER":"admin" -e "PASS":"admin" -e "PGID":"1000" -e "PUID":"1000" -v TDTransmissionConfig:/config -v TDTransmission:/downloads -v NASMountTransmission:/downloads/NAS -v TDTransmissionWatch:/watch linuxserver/transmission
Unifi Controller
- Create Docker Volume
docker volume create unifi_data
- Quick Start Unifi Controller Container
docker run -d --rm --init -p 8080:8080 -p 8443:8443 -p 8843:8843 -p 8880:8880 -p 3478:3478/udp -e TZ='Asia/Shanghai' -e JVM_MAX_HEAP_SIZE=1024M -v unifi_data:/unifi --name UniFi jacobalberty/unifi:stable
Unifi Controller (LinuxServer)
- Create Docker Volume
docker volume create unifiController_data
- Quick Start Unifi Controller (LinuxServer) Container
docker run -d --name=unifiController -e PUID=1000 -e PGID=1000 --network mvlan --ip 10.12.0.9 -v unifiController_data:/config --restart unless-stopped linuxserver/unifi-controller:version-6.2.25
Wordpress
Create Docker Volume
docker volume create wordpress_data
Make Directory & Create Config File
cd /var/lib/docker/volumes/wordpress_data/_data
mkdir conf
mkdir data
touch conf/wordpress.ini
Paste Wordpress Environment Variable to Config File
1
2
3
4
5
6[PHP]
memory_limit = 256M
post_max_size = 256M
upload_max_filesize = 256M
max_file_uploads = 32
date.timezone = PRCu can change the timezone to your timezone value.
through the above, u can change the maximum upload file size and memory size.
- Copy the above content and paste it into
conf/wordpress.ini
file
- Copy the above content and paste it into
Quick Start Wordpress Container
docker run -d --name "Wordpress" --link MariaDB:db -e WORDPRESS_DB_HOST="db" -e WORDPRESS_DB_USER="wordpress_user" -e WORDPRESS_DB_PASSWORD="wordpress_password" -e WORDPRESS_DB_NAME="wordpress_user" -e WORDPRESS_DB_CHARSET="utf8mb4" -e WORDPRESS_DB_COLLATE="utf8mb4_unicode_ci" -e WORDPRESS_TABLE_PREFIX="wordpress_" -e WORDPRESS_DEBUG=0 -p 127.0.0.1:8081:80 -v wordpress_data/conf/wordpress.ini:/usr/local/etc/php/conf.d/wordpress.ini -v wordpress_data/data:/var/www/html --restart=always wordpress:5.7.1-php8.0-apache
Zerotier
Create Docker Volume
docker volume create zerotier_data
Quick Start Zerotier Container
docker run -d --name Zerotier \ --net=host \ --device=/dev/net/tun \ --cap-add=NET_ADMIN \ --cap-add=SYS_ADMIN \ -v zerotier_data:/var/lib/zerotier-one \ --restart=unless-stopped \ bltavares/zerotier:1.6.2-2
Join Zerotier Network
8056c2e21c000001
is your zerotier network id.docker exec Zerotier /zerotier-cli join 8056c2e21c000001
ormkdir /var/lib/docker/volumes/zerotier_data/_data/networks.d/ && touch /var/lib/docker/volumes/zerotier_data/_data/networks.d/8056c2e21c000001.conf
AriaNG
- Quick Start AriaNG Container
1
2
3
4
5
6docker run -d \
--name ariang \
--log-opt max-size=1m \
--restart unless-stopped \
-p 6880:6880 \
p3terx/ariang