From 2434ef8e8c913075405664a37dd7d0bf24ed0fd2 Mon Sep 17 00:00:00 2001 From: alvin-reyes Date: Tue, 3 May 2022 18:24:31 -0400 Subject: [PATCH 1/3] feat: add hugo extended --- hugo-extended/Dockerfile | 13 +++++++++++++ hugo-extended/hooks/build | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 hugo-extended/Dockerfile create mode 100755 hugo-extended/hooks/build diff --git a/hugo-extended/Dockerfile b/hugo-extended/Dockerfile new file mode 100644 index 0000000..8bdda92 --- /dev/null +++ b/hugo-extended/Dockerfile @@ -0,0 +1,13 @@ +ARG NODE_VERSION + +FROM node:$NODE_VERSION + +ARG HUGO_VERSION=0.98.0 + +RUN apt-get update && apt-get install -y wget + +RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz && \ + tar -xf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin && \ + hugo version && rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz + +RUN wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash diff --git a/hugo-extended/hooks/build b/hugo-extended/hooks/build new file mode 100755 index 0000000..bc87e18 --- /dev/null +++ b/hugo-extended/hooks/build @@ -0,0 +1,12 @@ +#!/bin/bash + +NODE_VERSION=$(echo $DOCKER_TAG | cut -d "-" -f2) + +if [ $DOCKER_TAG == "latest" ] +then + docker build . --build-arg NODE_VERSION=${DOCKER_TAG} -t ${IMAGE_NAME} +else + docker build . --build-arg NODE_VERSION=${NODE_VERSION} -t ${IMAGE_NAME} +fi + + From 7f750d004fecba9898afc0bffce07126c3a3b3cc Mon Sep 17 00:00:00 2001 From: alvin-reyes Date: Tue, 3 May 2022 18:29:13 -0400 Subject: [PATCH 2/3] chore: use extended version --- hugo-extended/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugo-extended/Dockerfile b/hugo-extended/Dockerfile index 8bdda92..8693d8f 100644 --- a/hugo-extended/Dockerfile +++ b/hugo-extended/Dockerfile @@ -6,8 +6,8 @@ ARG HUGO_VERSION=0.98.0 RUN apt-get update && apt-get install -y wget -RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz && \ - tar -xf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin && \ +RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \ + tar -xf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin && \ hugo version && rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz RUN wget -q -O - https://raw.githubusercontent.com/canha/golang-tools-install-script/master/goinstall.sh | bash From 0fbaa2f5b1545bd7b969d6fbc0a2cb0ee1690f68 Mon Sep 17 00:00:00 2001 From: alvin-reyes Date: Tue, 3 May 2022 19:01:31 -0400 Subject: [PATCH 3/3] chore: added hugo and hugo-extended --- hugo-extended/Dockerfile | 4 ++++ hugo-extended/hooks/build | 1 + 2 files changed, 5 insertions(+) diff --git a/hugo-extended/Dockerfile b/hugo-extended/Dockerfile index 8693d8f..e493df9 100644 --- a/hugo-extended/Dockerfile +++ b/hugo-extended/Dockerfile @@ -6,6 +6,10 @@ ARG HUGO_VERSION=0.98.0 RUN apt-get update && apt-get install -y wget +RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz && \ + tar -xf hugo_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin && \ + hugo version && rm hugo_${HUGO_VERSION}_Linux-64bit.tar.gz + RUN wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz && \ tar -xf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin && \ hugo version && rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz diff --git a/hugo-extended/hooks/build b/hugo-extended/hooks/build index bc87e18..a4e9ffe 100755 --- a/hugo-extended/hooks/build +++ b/hugo-extended/hooks/build @@ -2,6 +2,7 @@ NODE_VERSION=$(echo $DOCKER_TAG | cut -d "-" -f2) +# If running on M1 add --platform linux/x86_64 on docker build if [ $DOCKER_TAG == "latest" ] then docker build . --build-arg NODE_VERSION=${DOCKER_TAG} -t ${IMAGE_NAME}