moved from debian to alpine
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Paolo Asperti 2024-05-02 10:21:57 +02:00
parent 774912f7aa
commit d11a2a1666
Signed by: paspo
GPG Key ID: 06D46905D19D5182
1 changed files with 5 additions and 7 deletions

View File

@ -6,19 +6,17 @@ ARG HUGO_ARCH=amd64
RUN \
apk -U add lastversion && \
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.deb$" --pre gohugoio/hugo --format assets ) -O /tmp/hugo.deb
wget $(lastversion --filter "hugo_extended_.*\-${HUGO_ARCH}\.tar\.gz$" --pre gohugoio/hugo --format assets ) -O - | tar xzv -C /tmp
##### final image
FROM debian:12-slim
FROM alpine:latest
COPY --from=prep /tmp/hugo.deb /tmp/hugo.deb
COPY --from=prep /tmp/hugo /usr/local/bin/hugo
RUN \
apt update && \
DEBIAN_FRONTEND=noninteractive apt -y upgrade && \
apt install -y /tmp/hugo.deb && \
rm -rf /var/lib/apt/lists/ /tmp/hugo.deb
apk --no-cache upgrade && \
apk --no-cache add gcompat
ENTRYPOINT [ "/usr/local/bin/hugo" ]