Dockerfile to build a HEXO container image.
If you find this image useful here's how you can help:
- Send a Pull Request with your awesome new features and bug fixes
- Be a part of the community and help resolve Issues
Automated builds of the image are available on Dockerhub and is the recommended method of installation.
docker pull croef/hexoAlternatively you can build the image locally.
docker build -t croef/gitlab github.com/croef/docker-croefStart Hexo:
-
Init Hexo for the first time
docker run -it --rm \ -v /path/to/hexo:/root/blog \ croef/hexo init
-
Run Hexo as daemon process
docker run -d --name blog -p 4000:4000 \ -v /path/to/hexo:/root/blog \ croef/hexo
Then you can open http://localhost:4000/ to watch your blog. Have fun!
If you want to use any commands, you can type it behand the run script, such as:
docker run -it --rm \
-v /path/to/hexo:/root/blog \
croef/hexo generateor
docker run -it --rm \
-v /path/to/hexo:/root/blog \
croef/hexo deploy