Skip to content

Commit

Permalink
Revert dev Dockerfile to use official devcontainer image (#2335)
Browse files Browse the repository at this point in the history
* Update Dockerfile to use official debian based image for devcontainer

* Use debian as base

* Update comment
  • Loading branch information
ykadowak authored Feb 9, 2024
1 parent 84c8434 commit 818790a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
36 changes: 36 additions & 0 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,42 @@ yamlfmt/install: $(GOPATH)/bin/yamlfmt
$(GOPATH)/bin/yamlfmt:
$(call go-install, github.com/google/yamlfmt/cmd/yamlfmt)

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

$(GOPATH)/bin/gopls:
$(call go-install, golang.org/x/tools/gopls)

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

$(GOPATH)/bin/gomodifytags:
$(call go-install, github.com/fatih/gomodifytags)

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

$(GOPATH)/bin/impl:
$(call go-install, github.com/josharian/impl)

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

$(GOPATH)/bin/goplay:
$(call go-install, github.com/haya14busa/goplay/cmd/goplay)

.PHONY: delve/install
delve/install: $(GOPATH)/bin/dlv

$(GOPATH)/bin/dlv:
$(call go-install, github.com/go-delve/delve/cmd/dlv)

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

$(GOPATH)/bin/staticcheck:
$(call go-install, honnef.co/go/tools/cmd/staticcheck)

.PHONY: rust/install
rust/install: $(CARGO_HOME)/bin/cargo

Expand Down
13 changes: 10 additions & 3 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
ARG MAINTAINER="vdaas.org vald team <[email protected]>"

# skipcq: DOK-DL3026
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder
# we should stick to official devcontainers as a base image because it is well tested to be used with the vscode devcontainer extension.
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/base:debian
LABEL maintainer="${MAINTAINER}"

ARG GO_VERSION
Expand Down Expand Up @@ -71,7 +72,6 @@ COPY rust rust
COPY hack/go.mod.default hack/go.mod.default
COPY example/client/go.mod.default example/client/go.mod.default

# basic deps
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \
make GOARCH=${TARGETARCH} GOOS=${TARGETOS} deps GO_CLEAN_DEPS=false \
Expand All @@ -89,4 +89,11 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \
&& make k9s/install \
&& make minikube/install \
&& make stern/install \
&& make telepresence/install
&& make telepresence/install \
&& echo "installing golang vscode extension dependencies" \
&& make gopls/install \
&& make gotests/install \
&& make gomodifytags/install \
&& make impl/install \
&& make delve/install \
&& make staticcheck/install

0 comments on commit 818790a

Please sign in to comment.