1.拉镜像
docker pull 80x86/typecho
2.实例化容器
docker run -d --name=typecho-blog --restart always -e PHP_TZ=Asia/Shanghai -e PHP_MAX_EXECUTION_TIME=600 -p 8081:80 80x86/typecho:latest
3.部署nginx配置
server {
listen 80;
server_name blog.yrclubs.com;
location / {
root html;
index index.html index.htm;
proxy_pass http://localhost:8081;
}
}
4.进入容器cp样式命令
docker exec -it c507450f5c9f /bin/sh
docker ps -a
docker cp /home/typecho/Handsome c507450f5c9f:/app/usr/plugins/
docker cp /home/typecho/Handsome c507450f5c9f:/app/usr/themes/