From 82028b5816ed56402f9a25b7a7fde4f2bcd6852f Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 04:35:51 +0000 Subject: [PATCH 01/14] add e2e envs to devcontainer --- .devcontainer/Dockerfile | 84 +++++++++++++++++++++++++++++++++ .devcontainer/devcontainer.json | 28 ++++------- 2 files changed, 93 insertions(+), 19 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..a3a64aeca2 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,84 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ARG MAINTAINER="vdaas.org vald team " + +FROM ubuntu:devel AS builder + +# skipcq: DOK-DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + unzip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /tmp + +# skipcq: DOK-DL3026 +FROM mcr.microsoft.com/vscode/devcontainers/go:1 AS base +LABEL maintainer "${MAINTAINER}" + +# skipcq: DOK-DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + curl \ + g++ \ + gawk \ + gcc \ + git \ + graphviz \ + jq \ + libhdf5-dev \ + liblapack-dev \ + libomp-dev \ + libopenblas-dev \ + nodejs \ + npm \ + sed \ + unzip \ + zip \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR ${GOPATH}/src/github.com/vdaas/vald + +COPY Makefile . +COPY Makefile.d Makefile.d +COPY versions versions + +RUN make ngt/install \ + && make helm/install \ + && make helm-docs/install \ + && make valdcli/install \ + && make yq/install \ + && make golangci-lint/install \ + && make reviewdog/install \ + && make protobuf/install + +# k3d +RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash +# kubectl +RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +RUN sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl +# k9s +# k9s installs the binary to the current user which is root for devcontainer +# so change the current user to vscode to user afterwards +USER vscode +RUN curl -sS https://webinstall.dev/k9s | bash + +WORKDIR ${GOPATH} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 606b4d0781..82293eee2f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,24 +1,14 @@ { "name": "Vald", - "image": "vdaas/vald-dev-container:nightly", + "dockerFile": "./Dockerfile", + "context": "..", "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], - - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "go.useGoProxyToCheckForToolUpdates": false, - "go.useLanguageServer": true, - "go.autocompleteUnimportedPackages": true, - "go.buildOnSave": true, - "go.vetOnSave": true, - "go.lintOnSave": true, - "go.testOnSave": true, - "go.gopath": "/go" - }, - "extensions": [ - "golang.Go", - "zxh404.vscode-proto3", - "wayou.vscode-todo-highlight", - "esbenp.prettier-vscode" - ], + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "version": "latest", + "enableNonRootDocker": "true", + "moby": "true" + } + }, "postCreateCommand": "go version" } From bc8264c93a6280f8f742c4e2af22e1b0da6e8606 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 19 May 2023 06:05:10 +0000 Subject: [PATCH 02/14] style: Format code with gofumpt and prettier --- .devcontainer/devcontainer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 82293eee2f..d750c519db 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,12 +3,12 @@ "dockerFile": "./Dockerfile", "context": "..", "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "version": "latest", - "enableNonRootDocker": "true", - "moby": "true" - } - }, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "version": "latest", + "enableNonRootDocker": "true", + "moby": "true" + } + }, "postCreateCommand": "go version" } From caeb8d1d521b8ee5e8ae5245826229e749c4b9f9 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 07:08:29 +0000 Subject: [PATCH 03/14] move Dockerfile --- .devcontainer/Dockerfile | 84 --------------------------------- .devcontainer/devcontainer.json | 2 +- dockers/dev/Dockerfile | 13 ++++- 3 files changed, 12 insertions(+), 87 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index a3a64aeca2..0000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (C) 2019-2023 vdaas.org vald team -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -ARG MAINTAINER="vdaas.org vald team " - -FROM ubuntu:devel AS builder - -# skipcq: DOK-DL3008 -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - unzip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /tmp - -# skipcq: DOK-DL3026 -FROM mcr.microsoft.com/vscode/devcontainers/go:1 AS base -LABEL maintainer "${MAINTAINER}" - -# skipcq: DOK-DL3008 -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - cmake \ - curl \ - g++ \ - gawk \ - gcc \ - git \ - graphviz \ - jq \ - libhdf5-dev \ - liblapack-dev \ - libomp-dev \ - libopenblas-dev \ - nodejs \ - npm \ - sed \ - unzip \ - zip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR ${GOPATH}/src/github.com/vdaas/vald - -COPY Makefile . -COPY Makefile.d Makefile.d -COPY versions versions - -RUN make ngt/install \ - && make helm/install \ - && make helm-docs/install \ - && make valdcli/install \ - && make yq/install \ - && make golangci-lint/install \ - && make reviewdog/install \ - && make protobuf/install - -# k3d -RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash -# kubectl -RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -RUN sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl -# k9s -# k9s installs the binary to the current user which is root for devcontainer -# so change the current user to vscode to user afterwards -USER vscode -RUN curl -sS https://webinstall.dev/k9s | bash - -WORKDIR ${GOPATH} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d750c519db..f86263b5d2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Vald", - "dockerFile": "./Dockerfile", + "dockerFile": "../dockers/dev/Dockerfile", "context": "..", "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], "features": { diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index f3199ab1d0..a3a64aeca2 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -64,12 +64,21 @@ COPY versions versions RUN make ngt/install \ && make helm/install \ && make helm-docs/install \ - && make kind/install \ && make valdcli/install \ && make yq/install \ && make golangci-lint/install \ && make reviewdog/install \ - && make kubectl/install \ && make protobuf/install +# k3d +RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash +# kubectl +RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +RUN sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl +# k9s +# k9s installs the binary to the current user which is root for devcontainer +# so change the current user to vscode to user afterwards +USER vscode +RUN curl -sS https://webinstall.dev/k9s | bash + WORKDIR ${GOPATH} From f34c36bd3cff0e35dc33d71f15756f78659241b8 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 16:33:45 +0900 Subject: [PATCH 04/14] refactor --- dockers/dev/Dockerfile | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index a3a64aeca2..7bf0642e0a 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -16,18 +16,6 @@ ARG MAINTAINER="vdaas.org vald team " -FROM ubuntu:devel AS builder - -# skipcq: DOK-DL3008 -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - unzip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /tmp - # skipcq: DOK-DL3026 FROM mcr.microsoft.com/vscode/devcontainers/go:1 AS base LABEL maintainer "${MAINTAINER}" From 90c586428e68986f68c5a3030278a798a7508162 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 16:33:58 +0900 Subject: [PATCH 05/14] update readme for dev Dockerfile --- dockers/dev/README.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/dockers/dev/README.md b/dockers/dev/README.md index be691b7957..7699cc6bd9 100644 --- a/dockers/dev/README.md +++ b/dockers/dev/README.md @@ -4,13 +4,13 @@ `vald-dev-container` is designed for the development of Vald on Docker. -This image includes some libraries required for implementation and is based on `ubuntu:devel` image. +This image includes some libraries required to develop Vald and is based on `mcr.microsoft.com/vscode/devcontainers/go:1` image.
-[![latest Image](https://img.shields.io/docker/v/vdaas/vald-dev-container/latest?label=vald-dev-container)](https://hub.docker.com/r/vdaas/vald-dev-container/tags?page=1&name=latest) +[![latest Image](https://img.shields.io/docker/v/vdaas/vald-dev-container/latest?label=vald-dev-container)](https://hub.docker.com/r/vdaas/vald-dev-container/tags?page=1&name=nightly) [![License: Apache 2.0](https://img.shields.io/github/license/vdaas/vald.svg?style=flat-square)](https://opensource.org/licenses/Apache-2.0) [![latest ver.](https://img.shields.io/github/release/vdaas/vald.svg?style=flat-square)](https://github.com/vdaas/vald/releases/latest) [![Twitter](https://img.shields.io/badge/twitter-follow-blue?logo=twitter&style=flat-square)](https://twitter.com/vdaas_vald) @@ -24,31 +24,19 @@ This image includes some libraries required for implementation and is based on ` - CPU instruction: requires `AVX2` or `AVX512` - Tools: Docker -### linux/arm64 - -- CPU instruction: NOT Apple Silicon -- Tools: Docker - ## Get Started -`vald-dev-container` is used for contributing to Vald's project. +`vald-dev-container` is used for contributing to Vald's project. Please use this container with [our Dev Container settings](https://github.com/vdaas/vald/blob/main/.devcontainer/devcontainer.json). -```bash -docker pull vdaas/vald-dev-container -docker run -name vald-dev -dit vdaas/vald-dev-container -docker exec -it vald-dev /bin/bash -``` ## Versions | tag | linux/amd64 | linux/arm64 | description | | :------ | :---------: | :---------: | :------------------------------------------------------------------------------------------------------------------------------ | -| latest | ✅ | ✅ | the latest image is the same as the latest version of [vdaas/vald](https://github.com/vdaas/vald) repository version. | | nightly | ✅ | ✅ | the nightly applies the main branch's source code of the [vdaas/vald](https://github.com/vdaas/vald) repository. | -| vX.Y.Z | ✅ | ✅ | the vX.Y.Z image applies the source code of the [vdaas/vald](https://github.com/vdaas/vald) repository. | | pr-XXX | ✅ | ❌ | the pr-XXX image applies the source code of the pull request XXX of the [vdaas/vald](https://github.com/vdaas/vald) repository. | ## Dockerfile From 187f0544a96995cd54395900f3a6ce0e8f7de00b Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 19 May 2023 07:36:01 +0000 Subject: [PATCH 06/14] style: Format code with gofumpt and prettier --- dockers/dev/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/dockers/dev/README.md b/dockers/dev/README.md index 7699cc6bd9..6364d89ec5 100644 --- a/dockers/dev/README.md +++ b/dockers/dev/README.md @@ -31,7 +31,6 @@ This image includes some libraries required to develop Vald and is based on `mcr `vald-dev-container` is used for contributing to Vald's project. Please use this container with [our Dev Container settings](https://github.com/vdaas/vald/blob/main/.devcontainer/devcontainer.json). - ## Versions | tag | linux/amd64 | linux/arm64 | description | From 7eff6ba0906a1bb34cb0f8e202be999a5b426bb3 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 07:47:00 +0000 Subject: [PATCH 07/14] remove unnecesary sudo --- dockers/dev/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index 7bf0642e0a..e6678f6ab8 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -62,7 +62,7 @@ RUN make ngt/install \ RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash # kubectl RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -RUN sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl +RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl # k9s # k9s installs the binary to the current user which is root for devcontainer # so change the current user to vscode to user afterwards From c16720943d76353e401af31cfcceb22adec652f0 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 16:54:26 +0900 Subject: [PATCH 08/14] Set the SHELL option -o pipefail before RUN with a pipe in --- dockers/dev/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index e6678f6ab8..319a6808fb 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -59,6 +59,7 @@ RUN make ngt/install \ && make protobuf/install # k3d +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash # kubectl RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" @@ -67,6 +68,7 @@ RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl # k9s installs the binary to the current user which is root for devcontainer # so change the current user to vscode to user afterwards USER vscode +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN curl -sS https://webinstall.dev/k9s | bash WORKDIR ${GOPATH} From 251c459f8bfe549fbade7f68ee515e9dc0d0e266 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 08:03:29 +0000 Subject: [PATCH 09/14] replace wget to curl --- dockers/dev/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index 319a6808fb..d10a96bdd3 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -60,7 +60,7 @@ RUN make ngt/install \ # k3d SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN wget -q -O - https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash +RUN curl -sS https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash # kubectl RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl From ccbdb7dabd3321533c19cbeded36e8fe0ec82c49 Mon Sep 17 00:00:00 2001 From: Yusuke Kadowaki Date: Fri, 19 May 2023 17:21:05 +0900 Subject: [PATCH 10/14] Update dockers/dev/README.md Co-authored-by: Kiichiro YUKAWA --- dockers/dev/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dockers/dev/README.md b/dockers/dev/README.md index 6364d89ec5..9ceb651779 100644 --- a/dockers/dev/README.md +++ b/dockers/dev/README.md @@ -29,7 +29,9 @@ This image includes some libraries required to develop Vald and is based on `mcr -`vald-dev-container` is used for contributing to Vald's project. Please use this container with [our Dev Container settings](https://github.com/vdaas/vald/blob/main/.devcontainer/devcontainer.json). +`vald-dev-container` is used for contributing to Vald's project. + +Please use this container with [our Dev Container settings](https://github.com/vdaas/vald/blob/main/.devcontainer/devcontainer.json). ## Versions From 33485b9f77e632bed9f604fd8c693712dece05ac Mon Sep 17 00:00:00 2001 From: ykadowak Date: Fri, 19 May 2023 08:24:43 +0000 Subject: [PATCH 11/14] add link to the image --- dockers/dev/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/dev/README.md b/dockers/dev/README.md index 9ceb651779..81e156c4b2 100644 --- a/dockers/dev/README.md +++ b/dockers/dev/README.md @@ -4,7 +4,7 @@ `vald-dev-container` is designed for the development of Vald on Docker. -This image includes some libraries required to develop Vald and is based on `mcr.microsoft.com/vscode/devcontainers/go:1` image. +This image includes some libraries required to develop Vald and is based on [`mcr.microsoft.com/vscode/devcontainers/go:1`](https://hub.docker.com/_/microsoft-vscode-devcontainers) image.
From 187a43007305fdc371941fb9fd4cde464a53e2a3 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Sat, 20 May 2023 21:54:56 +0900 Subject: [PATCH 12/14] update install make commands --- Makefile.d/k3d.mk | 2 +- Makefile.d/tools.mk | 3 ++- dockers/dev/Dockerfile | 10 +++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.d/k3d.mk b/Makefile.d/k3d.mk index e225469976..6cd083436c 100644 --- a/Makefile.d/k3d.mk +++ b/Makefile.d/k3d.mk @@ -24,7 +24,7 @@ k3d/install: $(BINDIR)/k3d $(BINDIR)/k3d: mkdir -p $(BINDIR) - wget -q -O - "https://raw.githubusercontent.com/rancher/k3d/main/install.sh" | bash + curl -sS https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash chmod a+x $(BINDIR)/$(K3D_COMMAND) .PHONY: k3d/start diff --git a/Makefile.d/tools.mk b/Makefile.d/tools.mk index 26ac47b603..2bf6f58f60 100644 --- a/Makefile.d/tools.mk +++ b/Makefile.d/tools.mk @@ -77,7 +77,8 @@ $(BINDIR)/kubectl: chmod a+x $(BINDIR)/kubectl else $(BINDIR)/kubectl: - curl -L "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o $(BINDIR)/kubectl + curl -LO "https://dl.k8s.io/release/$(shell curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + install -o root -g root -m 0755 kubectl $(BINDIR)/kubectl chmod a+x $(BINDIR)/kubectl endif diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index d10a96bdd3..e710cfc57b 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -56,14 +56,10 @@ RUN make ngt/install \ && make yq/install \ && make golangci-lint/install \ && make reviewdog/install \ - && make protobuf/install + && make protobuf/install \ + && make kubectl/install \ + && make k3d/install -# k3d -SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN curl -sS https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash -# kubectl -RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" -RUN install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl # k9s # k9s installs the binary to the current user which is root for devcontainer # so change the current user to vscode to user afterwards From 2ef314f1a765c64e8ab7549e8cd646343cbb8c50 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Mon, 22 May 2023 11:00:00 +0900 Subject: [PATCH 13/14] refactor comment --- dockers/dev/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index e710cfc57b..896d54dbd1 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -60,7 +60,6 @@ RUN make ngt/install \ && make kubectl/install \ && make k3d/install -# k9s # k9s installs the binary to the current user which is root for devcontainer # so change the current user to vscode to user afterwards USER vscode From 1355abde2321898e64eeec07c6f402448d498c48 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Mon, 22 May 2023 11:00:11 +0900 Subject: [PATCH 14/14] update kubectl/install --- Makefile.d/tools.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.d/tools.mk b/Makefile.d/tools.mk index 2bf6f58f60..7f2b0ee3ff 100644 --- a/Makefile.d/tools.mk +++ b/Makefile.d/tools.mk @@ -78,8 +78,8 @@ $(BINDIR)/kubectl: else $(BINDIR)/kubectl: curl -LO "https://dl.k8s.io/release/$(shell curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" - install -o root -g root -m 0755 kubectl $(BINDIR)/kubectl - chmod a+x $(BINDIR)/kubectl + chmod a+x ./kubectl + sudo mv ./kubectl $(BINDIR)/kubectl endif .PHONY: protobuf/install