Skip to content

Commit b583e36

Browse files
committed
chore: Build hugo (extended) from source to remove arch arg
Signed-off-by: Alexander Jung <alex@unikraft.org>
1 parent 4ae3a36 commit b583e36

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Dockerfile

+8-7
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ FROM unikraft/kraft:staging AS devenv
3232
LABEL maintainer "Alexander Jung <a.jung@lancs.ac.uk>"
3333

3434
ARG HUGO_VER=0.98.0
35-
ARG HUGO_ARCH=64bit
36-
ARG GO_VER=1.17.6
35+
ARG GO_VER=1.18.3
3736
ARG GO_ARCH=amd64
3837
ARG BUILD_REF=latest
3938

@@ -59,16 +58,18 @@ RUN set -xe; \
5958
nodejs yarn; \
6059
npm install -g esbuild-linux-64; \
6160
npm install; \
62-
cd /tmp; \
63-
curl -LO https://github.com/gohugoio/hugo/releases/download/v${HUGO_VER}/hugo_extended_${HUGO_VER}_Linux-${HUGO_ARCH}.tar.gz; \
64-
tar -xzf hugo_extended_${HUGO_VER}_Linux-${HUGO_ARCH}.tar.gz; \
65-
mv ./hugo /usr/local/bin/hugo; \
6661
wget -O /tmp/go.tar.gz https://go.dev/dl/go${GO_VER}.linux-${GO_ARCH}.tar.gz; \
6762
tar -C /usr/local -xzf /tmp/go.tar.gz; \
68-
rm /tmp/go.tar.gz
63+
rm /tmp/go.tar.gz; \
64+
git clone --branch v${HUGO_VER} https://github.com/gohugoio/hugo.git /tmp/hugo
6965

7066
ENV PATH="${PATH}:/usr/local/go/bin"
7167

68+
RUN set -xe; \
69+
cd /tmp/hugo; \
70+
GOBIN=/usr/local/bin/ CGO_ENABLED=1 go install --tags extended; \
71+
rm -rf /tmp/hugo
72+
7273
ENTRYPOINT [ "" ]
7374

7475
EXPOSE 1313

Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,11 @@ all:
5858

5959
.PHONY: container
6060
container: DOCKER_BUILD_EXTRA ?=
61-
container: HUGO_ARCH ?= 64bit
6261
container: GO_ARCH ?= amd64
6362
container: TAG ?= devenv
6463
container: TARGET ?= devenv
6564
container:
6665
$(DOCKER) build \
67-
--build-arg HUGO_ARCH=$(HUGO_ARCH) \
6866
--build-arg GO_ARCH=$(GO_ARCH) \
6967
--file $(WORKDIR)/Dockerfile \
7068
--target $(TARGET) \

0 commit comments

Comments
 (0)