Hexo-nexT博客搭建-Hexo优化-docker运行hexo镜像

推荐先阅读【2022教程全】Hexo博客 + nexT主题

docker pull taskbjorn/hexo

docker volume create my_hexo_data
docker run -it -f-name my_hexo_container -p 4000:4000 -v my_hexo_data:/home/hexo/.hexo taskbjorn/hexo

数据卷位置:

cd /var/lib/docker/volumes

进入容器内部:

docker exec -it my_hexo_container sh

exit:退出容器