Compare commits
6 Commits
71bbba11cc
...
4fb84bc0af
Author | SHA1 | Date | |
---|---|---|---|
4fb84bc0af | |||
901f1162a8 | |||
6cd9ce42b6 | |||
02ec4dbe04 | |||
1b5c7fab00 | |||
d168e6aaa6 |
54
.drone.yml
54
.drone.yml
@ -1,3 +1,4 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: linux-amd64
|
||||
@ -33,9 +34,7 @@ steps:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
tags:
|
||||
- ${DRONE_TAG}-linux-amd64
|
||||
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-amd64
|
||||
- ${DRONE_SEMVER_MAJOR}-linux-amd64
|
||||
- latest-amd64
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
@ -76,54 +75,11 @@ steps:
|
||||
username:
|
||||
from_secret: docker_username
|
||||
tags:
|
||||
- ${DRONE_TAG}-linux-arm64
|
||||
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-arm64
|
||||
- ${DRONE_SEMVER_MAJOR}-linux-arm64
|
||||
- latest-arm64
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
# no build server available (at the moment) for this arch
|
||||
|
||||
# ---
|
||||
# kind: pipeline
|
||||
# type: docker
|
||||
# name: linux-arm
|
||||
|
||||
# platform:
|
||||
# arch: arm
|
||||
# os: linux
|
||||
|
||||
# steps:
|
||||
# - name: build
|
||||
# image: plugins/docker:linux-arm
|
||||
# settings:
|
||||
# dockerfile: Dockerfile
|
||||
# dry_run: true
|
||||
# repo: docker.asperti.com/paspo/hugo
|
||||
# when:
|
||||
# event:
|
||||
# - push
|
||||
|
||||
# - name: build_and_publish
|
||||
# image: plugins/docker:linux-arm
|
||||
# settings:
|
||||
# dockerfile: Dockerfile
|
||||
# force_tag: true
|
||||
# password:
|
||||
# from_secret: docker_password
|
||||
# registry: docker.asperti.com
|
||||
# repo: docker.asperti.com/paspo/hugo
|
||||
# username:
|
||||
# from_secret: docker_username
|
||||
# tags:
|
||||
# - ${DRONE_TAG}-linux-arm
|
||||
# - ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}-linux-arm
|
||||
# - ${DRONE_SEMVER_MAJOR}-linux-arm
|
||||
# when:
|
||||
# event:
|
||||
# - tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@ -142,9 +98,6 @@ steps:
|
||||
from_secret: docker_password
|
||||
tags:
|
||||
- latest
|
||||
- ${DRONE_TAG}
|
||||
- ${DRONE_SEMVER_MAJOR}.${DRONE_SEMVER_MINOR}
|
||||
- ${DRONE_SEMVER_MAJOR}
|
||||
|
||||
trigger:
|
||||
event:
|
||||
@ -153,4 +106,3 @@ trigger:
|
||||
depends_on:
|
||||
- linux-amd64
|
||||
- linux-arm64
|
||||
# - linux-arm
|
||||
|
18
Dockerfile
18
Dockerfile
@ -1,11 +1,23 @@
|
||||
FROM debian:11-slim
|
||||
##### this stage will download latest deb package
|
||||
|
||||
FROM alpine:latest as prep
|
||||
|
||||
ARG HUGO_VERSION=0.111.3
|
||||
ARG HUGO_ARCH=amd64
|
||||
|
||||
ADD "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.deb" /tmp/hugo.deb
|
||||
RUN \
|
||||
apk -U add lastversion && \
|
||||
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.deb$" --pre gohugoio/hugo --format assets ) -O /tmp/hugo.deb
|
||||
|
||||
|
||||
##### final image
|
||||
|
||||
FROM debian:12-slim
|
||||
|
||||
COPY --from=prep /tmp/hugo.deb /tmp/hugo.deb
|
||||
|
||||
RUN \
|
||||
apt update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
|
||||
apt install -y /tmp/hugo.deb && rm /tmp/hugo.deb
|
||||
|
||||
ENTRYPOINT [ "/usr/local/bin/hugo" ]
|
||||
|
@ -4,6 +4,14 @@
|
||||
|
||||
Simple container for hugo development
|
||||
|
||||
## available tags
|
||||
|
||||
| tag | description |
|
||||
| ------------ | ----------------------------------- |
|
||||
| latest | multi-arch manifest |
|
||||
| latest-amd64 | latest build for amd64 architecture |
|
||||
| latest-arm64 | latest build for arm64 architecture |
|
||||
|
||||
## build
|
||||
|
||||
```bash
|
||||
@ -44,4 +52,3 @@ steps:
|
||||
## TODO
|
||||
|
||||
- Auto build and update based on hugo version
|
||||
|
||||
|
@ -1,31 +1,13 @@
|
||||
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
|
||||
{{#if build.tags}}
|
||||
tags:
|
||||
{{#each build.tags}}
|
||||
- {{this}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
image: docker.asperti.com/paspo/hugo:latest
|
||||
manifests:
|
||||
-
|
||||
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
|
||||
image: docker.asperti.com/paspo/hugo:latest-amd64
|
||||
platform:
|
||||
architecture: amd64
|
||||
os: linux
|
||||
-
|
||||
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
|
||||
image: docker.asperti.com/paspo/hugo:latest-arm64
|
||||
platform:
|
||||
variant: v8
|
||||
architecture: arm64
|
||||
os: linux
|
||||
-
|
||||
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
variant: v7
|
||||
architecture: arm
|
||||
os: linux
|
||||
-
|
||||
image: docker.asperti.com/paspo/hugo:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
|
||||
platform:
|
||||
variant: v6
|
||||
architecture: arm
|
||||
os: linux
|
||||
|
Loading…
x
Reference in New Issue
Block a user