From 16fa7ce7194c4f4041fc7e704e4b475f505a7688 Mon Sep 17 00:00:00 2001 From: sthope Date: Mon, 6 Sep 2021 17:02:29 +0200 Subject: [PATCH] initial commit --- .drone.yml | 2 -- Dockerfile | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml index 366e7d7..2f658ff 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,5 +8,3 @@ steps: hugo_version: 0.88.1 pull: always validate: false - commands: - - hugo new site /blog \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..520c3da --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine:latest + +LABEL maintainer="Sthope " + +RUN apk add --no-cache \ + curl \ + git \ + openssh-client \ + rsync \ + build-base \ + libc6-compat + +RUN HUGO=$(curl -Is https://github.com/gohugoio/hugo/releases/latest | grep -Fi Location | sed -E 's/.*tag\/v(.*)/\1/g;' |xargs ) && \ + 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 \ No newline at end of file