{"id":30882427,"url":"https://github.com/jguyomard/docker-hugo","last_synced_at":"2025-09-08T08:48:22.196Z","repository":{"id":15534750,"uuid":"58220427","full_name":"jguyomard/docker-hugo","owner":"jguyomard","description":":whale: Docker Image for Hugo, a fast and flexible static site generator","archived":false,"fork":false,"pushed_at":"2020-05-07T00:35:24.000Z","size":44,"stargazers_count":60,"open_issues_count":7,"forks_count":42,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-14T19:55:22.225Z","etag":null,"topics":["docker","docker-image","go","hugo","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jguyomard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-06T16:29:43.000Z","updated_at":"2022-08-20T10:45:40.000Z","dependencies_parsed_at":"2022-09-16T15:01:48.012Z","dependency_job_id":null,"html_url":"https://github.com/jguyomard/docker-hugo","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/jguyomard/docker-hugo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguyomard%2Fdocker-hugo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguyomard%2Fdocker-hugo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguyomard%2Fdocker-hugo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguyomard%2Fdocker-hugo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jguyomard","download_url":"https://codeload.github.com/jguyomard/docker-hugo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jguyomard%2Fdocker-hugo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274159651,"owners_count":25232636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","go","hugo","static-site-generator"],"created_at":"2025-09-08T08:48:20.694Z","updated_at":"2025-09-08T08:48:22.185Z","avatar_url":"https://github.com/jguyomard.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hugo Docker Image\n\n[![Docker Automated build](https://img.shields.io/docker/automated/jguyomard/hugo-builder.svg)](https://store.docker.com/community/images/jguyomard/hugo-builder)\n[![Docker Build Status](https://img.shields.io/docker/build/jguyomard/hugo-builder.svg)](https://store.docker.com/community/images/jguyomard/hugo-builder/builds)\n[![Docker Pulls](https://img.shields.io/docker/pulls/jguyomard/hugo-builder.svg)](https://store.docker.com/community/images/jguyomard/hugo-builder)\n[![Image Info](https://images.microbadger.com/badges/image/jguyomard/hugo-builder.svg)](https://microbadger.com/images/jguyomard/hugo-builder)\n\n[Hugo](https://gohugo.io/) is a fast and flexible static site generator, written in Go.\nHugo flexibly works with many formats and is ideal for blogs, docs, portfolios and much more.\nHugo’s speed fosters creativity and makes building a website fun again.\n\nThis Lightweight Docker Image is based on Alpine, and comes with rsync for Continuous Deployment.\n\n## Get Started\n\nPrint Hugo Help:\n\n```bash\ndocker run --rm -it jguyomard/hugo-builder hugo help\n```\n\nCreate a new Hugo managed website:\n\n```bash\ndocker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo new site mysite\ncd mysite\n\n# Now, you probably want to add a theme (see https://themes.gohugo.io/):\ngit init\ngit submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke;\necho 'theme = \"ananke\"' \u003e\u003e config.toml\n```\n\nAdd some content:\n\n```bash\ndocker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo new posts/my-first-post.md\n\n# Now, you can edit this post, add your content and remove \"draft\" flag:\nxdg-open content/posts/my-first-post.md\n```\n\nBuild your site:\n\n```bash\ndocker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo\n```\n\nServe your site locally:\n\n```bash\ndocker run --rm -it -v $PWD:/src -p 1313:1313 -u hugo jguyomard/hugo-builder hugo server -w --bind=0.0.0.0\n```\n\nThen open [`http://localhost:1313/`](http://localhost:1313/) in your browser.\n\nTo go further, read the [Hugo documentation](https://gohugo.io/documentation/).\n\n## Bash Alias\n\nFor ease of use, you can create a bash alias:\n\n```bash\nalias hugo='docker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder hugo'\nalias hugo-server='docker run --rm -it -v $PWD:/src -p 1313:1313 -u hugo jguyomard/hugo-builder hugo server --bind 0.0.0.0'\n```\n\nNow, you can use `hugo help`, `hugo new foo/bar.md`, `hugo-server -w`, etc.\n\n## Supported tags\n\nThe latest builds are:\n\n- [`latest`](https://github.com/jguyomard/docker-hugo/blob/master/Dockerfile)\n- [`extras`](https://github.com/jguyomard/docker-hugo/blob/master/extras/Dockerfile)\n- [`0.55`](https://github.com/jguyomard/docker-hugo/blob/v0.55/Dockerfile)\n- [`0.55-extras`](https://github.com/jguyomard/docker-hugo/blob/v0.55/extras/Dockerfile)\n\nA complete list of available tags can be found on the [docker store page](https://store.docker.com/community/images/jguyomard/hugo-builder/tags).\n\n## Users\n\nBy default, this docker image run as the root user. This makes it easy to use as base image for other Dockerfiles (switching back and forth adds extra layers and is against the current [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#user) advised by Docker). Most (all official?) base images leave the default user as root.\n\nHowever, this docker image also define a non-root user `hugo` (UID 1000, GID 1000) which can be switched on at run time using the `--user` flag to `docker run`.\n\n```bash\ndocker run --rm -it -v $PWD:/src --user hugo jguyomard/hugo-builder hugo\n```\n\nYou can also change this according your needs, by setting another UID/GID. For instance, to run hugo with user `www-data:www-data` (UID 33, GID 33) :\n\n```bash\ndocker run --rm -it -v $PWD:/src -u 33:33 jguyomard/hugo-builder hugo\n```\n\n## Extras\n\nThe [`extras`](https://github.com/jguyomard/docker-hugo/blob/master/extras/Dockerfile) tag adds additional tools and packages:\n\n- py-pygments\n\nTo use this version:\n\n```bash\ndocker run --rm -it -v $PWD:/src -u hugo jguyomard/hugo-builder:extras hugo\n```\n\n## Continuous Deployment\n\nI use this Docker image for Continuous Deployment. You can find some CI config examples in the [`ci-deploy`](https://github.com/jguyomard/docker-hugo/tree/master/ci-deploy) directory.\n\nThis Docker image also comes with:\n\n- rsync\n- git\n- openssh-client\n- [minify](https://github.com/tdewolff/minify)\n\n## Issues\n\nIf you have any problems with or questions about this docker image, please contact me through a [GitHub issue](https://github.com/jguyomard/docker-hugo/issues).\nIf the issue is related to Hugo itself, please leave an issue on the [Hugo official repository](https://github.com/spf13/hugo).\n\n## Contributing\n\nYou are invited to contribute new features, fixes or updates to this container, through a [Github Pull Request](https://github.com/jguyomard/docker-hugo/pulls).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjguyomard%2Fdocker-hugo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjguyomard%2Fdocker-hugo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjguyomard%2Fdocker-hugo/lists"}