Deploying Hexo environment in Windows with Docker. (Managing nodejs versions with docker is a way more elegant way than using nvm-windows, lol)
Suppose you have a directory
/your/hexo/pathon Windows that created using native Windows nodejs, something that looks like the screetshot below. Some of the plugins is installed in this directory, so you should mount this whole directory into the container.

docker run -d -v /your/hexo/path:/hexo -p 4000:4000 --name hexo-docker leslieleung/hexo-docker:latest
docker exec -it hexo-docker /bin/sh
Then you can do whatever you need with hexo, like hexo s or hexo g -d.
hexo-adminUse hexo-admin to manage posts and pages.
# RUN INSIDE THE CONTAINER
npm install --save hexo-admin
This should save whatever it need for hexo-admin in your mounted dirctory, so you only have to run this once.
http://localhost:4000 should do the job.
Content type
Image
Digest
Size
34 MB
Last updated
over 4 years ago
docker pull leslieleung/hexo-docker