Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (7 sloc) 672 Bytes


Dockerfile for using hugo locally as an alternative to installing. Built as minimal container.


docker run -it -p 1313:1313 -v $(pwd):/host hugo [flags] [command]

This can be aliased in your .bash_profile to use a standard directory and port for troubleshooting. Assuming using a blog folder under your home directory:

alias hugo='docker run -it -p 1313:1313 -v ~/blog:/host hugo'

Reload your terminal session, and you can run hugo new site .. Use the current working directory within the container to point to your blog (provided you mapped /host to the directory on the host).

You can’t perform that action at this time.