Skip to content

Docker container for Hexo - a fast, simple and powerful blog framework powered by Node.js - based on Alpine Linux.

License

Notifications You must be signed in to change notification settings

taskbjorn/docker-hexo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick reference

Supported tags and respective Dockerfile links

What is docker-hexo?

docker-hexo

docker-hexo is a Docker container for the Hexo blog framework based on Alpine Linux.

Running using Docker or Docker Compose

To run the container and persist data across container restarts, create a volume with a name of your choice (hexo_data, in this example) and run the following:

docker volume create my_hexo_data
docker run -it --name my_hexo_container -p 4000:4000 -v hexo_data:/home/hexo/.hexo taskbjorn/hexo

Your blog will then be available at http://0.0.0.0:4000 on your host.

If you use Docker Compose. you may use the example Compose file provided in this repository. Make sure to adjust the configuration (container names, volume names, ports, etc.) to fit your needs.

How to use docker-hexo

On first run, the container initializes a new site in /home/hexo/.hexo. The static pages are then served through the integrated web server hexo-server running on the container port 4000. If a pre-populated volume is mounted at /home/hexo/.hexo, then no new site is initialized and the pre-existing contents of the volume are served instead.

To use Hexo, you may run a command inside the Docker container as follows:

docker exec my_hexo_container hexo <command>

You can find the list of available commands on the Commands page of the official Hexo documentation.

Alternatively, you may open an interactive shell which will start in the root of your blog and give you direct access to the hexo command:

docker exec -it my_hexo_container sh
hexo generate

License

This image is licensed under GNU General Public License v3.0.

As it is often the case with Docker images, some of the software contained in this image (e.g. the base image, software included in the base image, etc.) may be covered under a difference license.

Please remember it is your responsibility as the end-user to ensure that your use case complies with the licenses of all included software.

About

Docker container for Hexo - a fast, simple and powerful blog framework powered by Node.js - based on Alpine Linux.

Topics

Resources

License

Stars

Watchers

Forks