26 lines
685 B
Docker
26 lines
685 B
Docker
FROM alpine:latest
|
|
|
|
LABEL maintainer="Sthope <HopelessAutomations@gmail.com>"
|
|
|
|
RUN apk add --no-cache \
|
|
curl \
|
|
git \
|
|
openssh-client \
|
|
rsync \
|
|
build-base \
|
|
libc6-compat
|
|
|
|
RUN HUGO=$(curl -s "https://api.github.com/repos/gohugoio/hugo/releases/latest" | awk -F '"' '/tag_name/{print $4}'| sed -E 's/v//g;') && \
|
|
export HUGO && \
|
|
mkdir -p /usr/local/src && \
|
|
cd /usr/local/src && \
|
|
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO}/hugo_extended_${HUGO}_linux-64bit.tar.gz" | tar -xz && \
|
|
mv hugo /usr/local/bin/hugo && \
|
|
addgroup -Sg 1000 hugo && \
|
|
adduser -Sg hugo -u 1000 -h /src hugo
|
|
|
|
WORKDIR /src
|
|
|
|
EXPOSE 1313
|
|
|