Sign inSign up

leslieleung/hexo-docker

By leslieleung

•Updated over 4 years ago

Image
0

340

leslieleung/hexo-docker repository overview

⁠hexo-docker

Deploying Hexo environment in Windows with Docker. (Managing nodejs versions with docker is a way more elegant way than using nvm-windows, lol)

⁠Usage

Suppose you have a directory /your/hexo/path on 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.

⁠Initializing container
docker run -d -v /your/hexo/path:/hexo -p 4000:4000 --name hexo-docker leslieleung/hexo-docker:latest
⁠Getting into the container
docker exec -it hexo-docker /bin/sh

Then you can do whatever you need with hexo, like hexo s or hexo g -d.

Use 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.

⁠Accessing hexo-admin from host machine

http://localhost:4000 should do the job.

Tag summary

Content type

Image

Digest

Size

34 MB

Last updated

over 4 years ago

docker pull leslieleung/hexo-docker