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