From 3f7f7f7b8ecdc69b83d88a729efaea18f8154c84 Mon Sep 17 00:00:00 2001 From: inductor Date: Sun, 18 Oct 2020 09:53:34 +0900 Subject: [PATCH 1/3] rebase master --- Makefile | 2 +- README.md | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e8576459a4..0fa3608840 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ container-image: --build-arg HUGO_VERSION=$(HUGO_VERSION) container-build: module-check - $(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) hugo --minify + $(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify" container-serve: module-check $(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir diff --git a/README.md b/README.md index 5966a17b36..b03847c302 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ You can run the website locally using Hugo (Extended version), or you can run it To use this repository, you need the following installed locally: -- [yarn](https://yarnpkg.com/) -- [npm](https://www.npmjs.com/) - [Go](https://golang.org/) - [Hugo (Extended version)](https://gohugo.io/) - A container runtime, like [Docker](https://www.docker.com/). @@ -28,9 +26,6 @@ cd website The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/docsy#readme). Even if you plan to run the website in a container, we strongly recommend pulling in the submodule and other development dependencies by running the following: ``` -# install dependencies -yarn - # pull in the Docsy submodule git submodule update --init --recursive --depth 1 ``` From 28209e0b0032b30f2a29990e2bb8cc1ba41a72e6 Mon Sep 17 00:00:00 2001 From: inductor Date: Fri, 7 Aug 2020 01:54:08 +0900 Subject: [PATCH 2/3] apply review --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b03847c302..c19aae489c 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ You can run the website locally using Hugo (Extended version), or you can run it To use this repository, you need the following installed locally: +- [npm](https://www.npmjs.com/) - [Go](https://golang.org/) - [Hugo (Extended version)](https://gohugo.io/) - A container runtime, like [Docker](https://www.docker.com/). @@ -48,6 +49,8 @@ Make sure to install the Hugo extended version specified by the `HUGO_VERSION` e To build and test the site locally, run: ```bash +# install dependencies +npm ci make serve ``` From 59d643b8a387dfc0ee60346fccebc6a09466b947 Mon Sep 17 00:00:00 2001 From: inductor Date: Sun, 1 Nov 2020 11:01:10 +0900 Subject: [PATCH 3/3] fix build --- Dockerfile | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4ceae22959..e168c3e6dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ RUN apk add --no-cache \ build-base \ libc6-compat \ npm && \ - npm install -G autoprefixer postcss-cli + npm install -D autoprefixer postcss-cli ARG HUGO_VERSION diff --git a/Makefile b/Makefile index 0fa3608840..58babc3627 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ container-image: --build-arg HUGO_VERSION=$(HUGO_VERSION) container-build: module-check - $(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify" + $(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify" container-serve: module-check $(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir