Skip to content

Commit

Permalink
Revert "Install additional tools for docker image for devcontainer (#…
Browse files Browse the repository at this point in the history
…2101)"

This reverts commit 10506e5.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent 537d8a2 commit f279c0c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"moby": "true"
}
},
"remoteUser": "root",
"postCreateCommand": "go version",
"postAttachCommand": "mkdir -p /etc/server && ln -s $(pwd)/cmd/agent/core/ngt/sample.yaml /etc/server/config.yaml",
"postAttachCommand": "sudo ln -s $(pwd)/cmd/agent/core/ngt/sample.yaml /etc/server/config.yaml",
"appPort": "3000:3000"
}
12 changes: 0 additions & 12 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,3 @@ $(BINDIR)/buf:
"https://github.com/bufbuild/buf/releases/download/$(BUF_VERSION)/buf-$(shell uname -s)-$(shell uname -m)" \
-o "${BINDIR}/buf" && \
chmod +x "${BINDIR}/buf"

.PHONY: k9s/install
k9s/install: $(GOPATH)/bin/k9s

$(GOPATH)/bin/k9s:
$(call go-install, github.com/derailed/k9s)

.PHONY: stern/install
stern/install: $(GOPATH)/bin/stern

$(GOPATH)/bin/stern:
$(call go-install, github.com/stern/stern)
25 changes: 16 additions & 9 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,31 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

WORKDIR ${GOPATH}/src/github.com/vdaas/vald

COPY Makefile .
COPY Makefile.d Makefile.d
COPY versions versions
COPY hack/go.mod.default hack/go.mod.default

# basic deps
RUN make deps \
&& make ngt/install \
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 \
&& make kubectl/install
&& make kubectl/install \
&& make k3d/install

# change GOPATH owner to vscode to run commands as user vscode without root permission
RUN chown -R vscode:vscode "${GOPATH}" \
# mkdir for agent configuration install
&& mkdir -p /etc/server

# 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

# additional deps
RUN make k3d/install \
&& make buf/install \
&& make k9s/install
RUN go install github.com/stern/stern@latest

0 comments on commit f279c0c

Please sign in to comment.