2022-10-02 14:55:45 +00:00
|
|
|
# docker-hugo
|
|
|
|
|
|
|
|
[![Build Status](https://drone.asperti.com/api/badges/paspo/docker-hugo/status.svg)](https://drone.asperti.com/paspo/docker-hugo)
|
|
|
|
|
|
|
|
Simple container for hugo development
|
|
|
|
|
2024-05-02 07:23:59 +00:00
|
|
|
## available tags
|
|
|
|
|
|
|
|
| tag | description |
|
|
|
|
| ------------ | ----------------------------------- |
|
|
|
|
| latest | multi-arch manifest |
|
|
|
|
| latest-amd64 | latest build for amd64 architecture |
|
|
|
|
| latest-arm64 | latest build for arm64 architecture |
|
|
|
|
|
2022-10-02 14:55:45 +00:00
|
|
|
## build
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker build . -t docker.asperti.com/paspo/hugo
|
|
|
|
```
|
|
|
|
|
|
|
|
## run
|
|
|
|
|
|
|
|
Version check:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker run --rm -ti docker.asperti.com/paspo/hugo version
|
|
|
|
```
|
|
|
|
|
|
|
|
Build hugo website:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker run --rm -ti \
|
|
|
|
-v "$PWD:/src" docker.asperti.com/paspo/hugo -s /src --gc --minify
|
|
|
|
```
|
|
|
|
|
|
|
|
## drone plugin
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: deploy
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build hugo
|
|
|
|
image: docker.asperti.com/paspo/hugo:latest
|
|
|
|
pull: always
|
|
|
|
commands:
|
|
|
|
- "hugo -s /drone/src --gc --minify"
|
|
|
|
```
|
2022-10-02 14:57:57 +00:00
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
|
|
|
- Auto build and update based on hugo version
|