Make the build work in Docker as well
This commit is contained in:
+2
-11
@@ -1,19 +1,10 @@
|
||||
FROM debian AS builder
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y curl jq git \
|
||||
&& 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 \
|
||||
&& tar -C /usr/local/bin -xf hugo.tar.gz hugo
|
||||
RUN apt-get update && apt-get install -y curl git
|
||||
|
||||
COPY . /site
|
||||
|
||||
WORKDIR /site
|
||||
|
||||
RUN hugo
|
||||
RUN ./build.sh
|
||||
|
||||
FROM nginx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user