https://github.com/ZHENFENG13/My-Blog/wiki/2-%E9%80%9A%E8%BF%87%E5%85%B1%E4%BA%AB%E9%95%9C%E5%83%8F%E7%9B%B4%E6%8E%A5%E9%83%A8%E7%BD%B2My-Blog

    安装Docker

    1. yum install -y yum-utils device-mapper-persistent-data lvm2
    2. wget http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
    3. yum -y install epel-release
    4. yum makecache fast
    5. yum clean all
    6. yum -y install docker-ce
    7. systemctl enable docker
    8. systemctl restart docker

    拉取BLOG以及对应数据库镜像

    docker pull registry.cn-hangzhou.aliyuncs.com/13/myblog:mysql
    docker pull registry.cn-hangzhou.aliyuncs.com/13/myblog:blog
    
    docker run \
    --name mysql \
    -p 13306:3306 \
    -d registry.cn-hangzhou.aliyuncs.com/13/myblog:mysql
    
    docker run \
    --name my-blog \
    -p 28080:8080 \
    --link mysql \
    -v /data/blog/webapps/app.jar:/app.jar \
    -d registry.cn-hangzhou.aliyuncs.com/13/myblog:blog
    

    首页地址:http://localhost:28080
    后台地址:http://localhost:28080/admin
    默认账号密码:admin 123456