Sign inSign up

ech0server/hugo-raspberrypi

By ech0server

Updated over 6 years ago

Docker image for building and running Hugo (https://gohugo.io) on a Raspberry Pi

Image
0

948

ech0server/hugo-raspberrypi repository overview

ech0server/hugo-raspberrypi is a Docker base image for static sites generated with Hugo for ARM devices like raspberrypi

This image is based on monachus/hugo image, but this works for ARM

Images derived from this image can either run as a stand-alone server, or function as a volume image for your web server. You can also use them in a CI/CD system such as Gitlab CI to build your content prior to bundling it into a standalone webserver container such as httpd:alpine. Prerequisites

The image is based on the following directory structure:

.
├── Dockerfile
└── site
    ├── config.toml
    ├── content
    │   └── ...
    ├── layouts
    │   └── ...
    └── static
    └── ...

In other words, your Hugo site resides in the site directory, and you have a simple Dockerfile:

FROM ech0server/hugo-raspberrypi

Building your site

Based on this structure, you can easily build an image for your site:

docker build -t monachus/hugo .

Your site is automatically generated during this build.

Using your site

There are two options for using the image you generated:

  • as a stand-alone image
  • as a volume image for your webserver

Using your image as a stand-alone image is the easiest:

docker run -p 1313:1313 ech0server/hugo-raspberrypi

This will automatically start hugo server, and your blog is now available on http://localhost:1313

Tag summary

Content type

Image

Digest

Size

91.5 MB

Last updated

over 6 years ago

docker pull ech0server/hugo-raspberrypi