Sign inSign up

zuorn/hexo

By zuorn

Updated over 7 years ago

docker-hexo

Image
0

827

zuorn/hexo repository overview

拉取镜像

docker pull zuorn/hexo

启动镜像

docker run -dit -p 4000:4000 --name website -v /Users/xinaogudu/website zuorn/hexo

-v 是指定宿主机的某个硬盘位置和容器里的位置关联。/Users/xinaogudu/website表示G盘的data文件夹对应容器中的/opt/website 文件夹。

进入容器

docker attach website

初始化

hexo init 

现在宿主机的目录上已经有了hexo内容

生成

hexo g

预览

hexo s

浏览器上输入 http://localhost:4000

Tag summary

Content type

Image

Digest

Size

52.3 MB

Last updated

over 7 years ago

docker pull zuorn/hexo