https://github.com/leslieleung/hexo-docker
Deploying Hexo environment in Windows with Docker.
https://github.com/leslieleung/hexo-docker
Last synced: 7 months ago
JSON representation
Deploying Hexo environment in Windows with Docker.
- Host: GitHub
- URL: https://github.com/leslieleung/hexo-docker
- Owner: LeslieLeung
- Created: 2022-02-19T08:27:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-19T08:29:13.000Z (over 3 years ago)
- Last Synced: 2025-01-21T15:23:57.881Z (9 months ago)
- Language: Dockerfile
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```bash
docker run -d -v /your/hexo/path:/hexo -p 4000:4000 --name hexo-docker leslieleung/hexo-docker:latest
```### Getting into the container
```bash
docker exec -it hexo-docker /bin/sh
```Then you can do whatever you need with hexo, like `hexo s` or `hexo g -d`.
### (Recommended) Install `hexo-admin`
> Use [hexo-admin](https://github.com/jaredly/hexo-admin) to manage posts and pages.
```bash
# 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.