Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mazgi/container-image.hugo-static-website
https://github.com/mazgi/container-image.hugo-static-website
dockerfile hugo static-site-generator
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mazgi/container-image.hugo-static-website
- Owner: mazgi
- Created: 2018-08-09T18:38:46.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-07-25T08:55:06.000Z (6 months ago)
- Last Synced: 2024-10-12T22:34:48.598Z (3 months ago)
- Topics: dockerfile, hugo, static-site-generator
- Language: Dockerfile
- Homepage: https://github.com/users/mazgi/packages/container/package/hugo-static-website
- Size: 85 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# container-image.hugo-static-website
[![publish-container-images](https://github.com/mazgi/container-image.hugo-static-website/actions/workflows/publish-container-images.yaml/badge.svg)](https://github.com/mazgi/container-image.hugo-static-website/actions/workflows/publish-container-images.yaml)
[![start-stop-containers](https://github.com/mazgi/container-image.hugo-static-website/actions/workflows/start-stop-containers.yaml/badge.svg)](https://github.com/mazgi/container-image.hugo-static-website/actions/workflows/start-stop-containers.yml)## How to Use
### Write out your IDs and information in the .env file
If you have an old `.env` file, you are able to reset it by removing it.
```console
rm -f .env
```:information_source: If you are using Linux, write out UID and GID into the `.env` file to let that as exported on Docker Compose as environment variables.
```console
test $(uname -s) = 'Linux' && {
echo -e "GID=$(id -g)"
echo -e "UID=$(id -u)"
} >> .env || :
```## Supplementary Information
### Environment Variable Names
Environment variable names and uses are as follows.
| Name | Required on Linux | Value |
| ---------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| UID | **Yes** | This ID number is used as UID for your Docker user, so this ID becomes the owner of all files and directories created by the container. |
| GID | **Yes** | The same as the above UID. |## How to update the Hugo version
```shellsession
export HUGO_VERSION=0.72.0
export TAG=hugo-${HUGO_VERSION}-$(date +%Y.%m.0)
sed -i "s/ARG HUGO_VERSION=.*/ARG HUGO_VERSION=${HUGO_VERSION}/" Dockerfile.d/hugo-static-website/Dockerfile
git commit -m "update hugo version to ${HUGO_VERSION}" Dockerfile.d/hugo-static-website/Dockerfile
git tag $TAG
git push origin $TAG
```