nginx
1 2 3 4
| docker run -d -p 80:80 \ -v /var/local/nginx/html:/usr/share/nginx/html \ -v /var/local/nginx/conf:/etc/nginx/conf.d \ --name nginx nginx:1.23.2
|
需要在/var/local/nginx/conf下新建一个default.cnf文件, 参考如下:
1 2 3 4 5 6 7 8 9
| server { listen 80; listen [::]:80; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } }
|
portainer
1 2 3 4 5
| docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock \ -v /var/local/portainer:/data \ --restart=always \ --name portainer portainer/portainer-ce
|
mysql8
1 2 3 4 5 6 7
| docker run -d -p 3306:3306 \ -v /var/local/mysql8/data:/var/lib/mysql \ -v /var/local/mysql8/conf.d:/etc/mysql/conf.d \ -v /var/local/mysql8/mysql-files:/var/lib/mysql-files \ -e MYSQL_ROOT_PASSWORD=root \ --restart=always \ --name mysql8 mysql:8
|
wiki
1 2 3 4 5 6 7 8 9
| docker run -d -p 3000:3000 \ -e "DB_TYPE=mysql" \ -e "DB_HOST=172.29.50.74" \ -e "DB_PORT=3306" \ -e "DB_USER=wikijs" \ -e "DB_PASS=wikijs" \ -e "DB_NAME=wikijs" \ --restart unless-stopped \ --name wiki requarks/wiki:2.5
|
blog-sync
1 2 3
| docker run -d -p 9900:80 \ -v /var/local/nginx/html/blog:/opt/myblog/repo/public \ --name blog-sync blog-sync:1.0
|
centos
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| docker run -itd \ -p 7500:80 \ -p 7501:22 \ -p 7502:3306 \ -p 7503:6379 \ -p 7504:5672 \ -p 7505:15672 \ -p 7506:2181 \ -p 7507:7507 \ -p 7508:7508 \ --restart=always \ --privileged=true \ --name hwc-centos \ centos:7 /usr/sbin/init
|