docker安装宝塔系统

免费的简单好用的服务器运维面板,参谋长专属教程:
环境:centos7

# baotai install
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install docker-ce

# start 
systemctl start docker
docker run -tid --name baota -p 80:80 -p 443:443 -p 8888:8888 -p 888:888 -p 20:20 -p 21:21 --restart always -v baota_www:/www -v /data/wwwroot:/www/wwwroot pch18/baota

// doc https://hub.docker.com/r/pch18/baota/?_pxhc=1540707910755

# info
docker exec baota bt default

# baota file
ll /var/lib/docker/volumes/baota_www/

# ip
docker inspect --format '{{ .NetworkSettings.IPAddress }}' baota

# php
docker exec baota php -r "echo 111;"

# mysql
docker exec -ti baota mysql

# login
docker exec -ti baota /bin/bash

标签: 无

发表评论: