-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM registry.fedoraproject.org/fedora:40 AS downloader | ||
|
||
|
||
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.127.0/hugo_0.127.0_Linux-64bit.tar.gz -o hugo.tar.gz \ | ||
&& tar -zxvf hugo.tar.gz | ||
|
||
|
||
FROM registry.fedoraproject.org/fedora:40 | ||
|
||
COPY --from=downloader /hugo /usr/bin | ||
|
||
RUN mkdir -p /workspace | ||
VOLUME /workspace | ||
WORKDIR /workspace | ||
|
||
ENTRYPOINT ["/usr/bin/hugo"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Fedora image for Hugo-based generation | ||
====================================== | ||
|
||
|
||
This Fedora container image contains: | ||
|
||
- hugo: https://github.com/gohugoio/hugo | ||
The world’s fastest framework for building websites | ||
|
||
|
||
## Usage instructions | ||
Start the container in the folder that contains your blog source | ||
|
||
```bash | ||
$ podman run --rm -v $PWD:/workspace \ | ||
ghcr.io/gbraad-redhat/hugo:0.127.0 --minify | ||
``` | ||
|
||
This will generate a `public` output. | ||
|
||
Or using | ||
|
||
```bash | ||
$ podman run --rm -v $PWD:/workspace -p 1313:1313 \ | ||
ghcr.io/gbraad-redhat/hugo:0.127.0 \ | ||
server --bind 0.0.0.0 | ||
``` | ||
the generated content will be published using the embedded server on http://localhost:1313 | ||
|
||
|
||
## Build container | ||
|
||
```bash | ||
$ podman build -t hugo -f Containerfile . | ||
``` |