Skip to content

Small alpine image building websites with hugo and serves them with NGINX

Notifications You must be signed in to change notification settings

makii42/alpine-hugo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

alpine-hugo

Docker Repository on Quay

This is a small docker image based on the incredibly small alpine linux image that can be used to build and deploy hugo websites as a container.

To achieve that, the images comes with an installed hugo and nginx. It defines two ONBUILD triggers for images based on it:

  • add the current folder to /site.
  • run hugo in the /site folder.

The default start command will run nginx and serve content from /site/public.

Great, how do I use it?

You just add a boilerplate Dockerfile to your hugo folder, containing this:

FROM alpine-hugo

As the this image comes with ONBUILD triggers, nothing else is to do! Build it as usual:

$ docker build -t myblog .

And run just the same:

$ docker run --rm --name my-blog-container myblog

The nginx config is pretty much in default configuration, so it's listening on port 80.

About

Small alpine image building websites with hugo and serves them with NGINX

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published