Update docker build to support M1 Mac

This commit is contained in:
2023-01-04 00:06:24 +00:00
parent fc6e65dad3
commit ad39fb9952
2 changed files with 5 additions and 3 deletions
-1
View File
@@ -1 +0,0 @@
.git
+5 -2
View File
@@ -1,8 +1,11 @@
FROM debian AS builder FROM debian AS builder
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y curl jq \ && apt-get install -y curl jq git \
&& URL=$(curl -sS -H 'Accept: appliction/vnd.github.v3+json' https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.assets[] | select(.name | test("hugo_[^e].*Linux-64bit.tar.gz")) | .browser_download_url') \ && ARCH=$(uname -m | sed -e 's/x86_/amd/' -e 's/aarch/arm/') \
&& echo ">>> ARCH $ARCH" \
&& URL=$(curl -sS -H 'Accept: appliction/vnd.github.v3+json' https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.assets[] | select(.name | test("hugo_[^e].*linux-'$ARCH'.tar.gz")) | .browser_download_url') \
&& echo ">>> URL $URL" \
&& curl -sSL -o hugo.tar.gz $URL \ && curl -sSL -o hugo.tar.gz $URL \
&& tar -C /usr/local/bin -xf hugo.tar.gz hugo && tar -C /usr/local/bin -xf hugo.tar.gz hugo