Skip to content

Commit

Permalink
Use debian as base
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Feb 9, 2024
1 parent d59583c commit 6c00bdd
Show file tree
Hide file tree
Showing 2 changed files with 45 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
12 changes: 9 additions & 3 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ARG MAINTAINER="vdaas.org vald team <vald@vdaas.org>"
# Ubuntu is not supported by a lot of devcontainer features like `docker-in-docker`, so we should stick to official debian based ones
# https://github.com/devcontainers/features/blob/08fb370a59cc311d9f81a9e90be33cf2e6648baa/src/docker-in-docker/install.sh#L123
# FIXME: change the tag to :1 when they support go 1.22
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/go:dev-1.22 AS builder
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/base:debian
LABEL maintainer="${MAINTAINER}"

ARG GO_VERSION
Expand Down Expand Up @@ -74,7 +74,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 @@ -92,4 +91,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 6c00bdd

Please sign in to comment.