Skip to content

Commit

Permalink
update ubuntu version for devcontainer (#2736)
Browse files Browse the repository at this point in the history
* ♻️ update ubuntu version for devcontainer

Signed-off-by: vankichi <[email protected]>

* 💚 add platform opts

Signed-off-by: vankichi <[email protected]>

* ♻️ Remove unnecessary installation

Signed-off-by: vankichi <[email protected]>

* ♻️ Change install helm command

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

* 💚 remove platform opts

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
  • Loading branch information
vankichi and kpango authored Nov 18, 2024
1 parent 246fb12 commit 3d51a12
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
9 changes: 7 additions & 2 deletions Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ helm/install: $(BINDIR)/helm

$(BINDIR)/helm:
mkdir -p $(BINDIR)
curl -fsSL "https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3" | HELM_INSTALL_DIR=$(BINDIR) bash
$(eval DARCH := $(subst aarch64,arm64,$(ARCH)))
TAR_NAME=helm-$(HELM_VERSION)-$(OS)-$(subst x86_64,amd64,$(shell echo $(DARCH) | tr '[:upper:]' '[:lower:]')) \
&& cd $(TEMP_DIR) \
&& curl -fsSL "https://get.helm.sh/$${TAR_NAME}.tar.gz" -o "$(TEMP_DIR)/$${TAR_NAME}" \
&& tar -xzvf "$(TEMP_DIR)/$${TAR_NAME}" --strip=1 \
&& mv helm $(BINDIR)/helm

.PHONY: helm-docs/install
## install helm-docs
Expand All @@ -32,7 +37,7 @@ $(BINDIR)/helm-docs:
TAR_NAME=helm-docs_$(HELM_DOCS_VERSION)_$(UNAME)_$(DARCH).tar.gz \
&& cd $(TEMP_DIR) \
&& curl -fsSL "https://github.com/norwoodj/helm-docs/releases/download/v$(HELM_DOCS_VERSION)/$${TAR_NAME}" -o "$(TEMP_DIR)/$${TAR_NAME}"\
&& tar xzvf "$(TEMP_DIR)/$${TAR_NAME}" \
&& tar -xzvf "$(TEMP_DIR)/$${TAR_NAME}" \
&& mv helm-docs $(BINDIR)/helm-docs

.PHONY: helm/package/vald
Expand Down
11 changes: 3 additions & 8 deletions dockers/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# DO_NOT_EDIT this Dockerfile is generated by https://github.com/vdaas/vald/blob/main/hack/docker/gen/main.go
ARG UPX_OPTIONS=-9
# skipcq: DOK-DL3026,DOK-DL3007
FROM mcr.microsoft.com/devcontainers/base:ubuntu22.04
FROM mcr.microsoft.com/devcontainers/base:ubuntu24.04
LABEL maintainer="vdaas.org vald team <[email protected]>"
# skipcq: DOK-DL3002
USER root:root
Expand Down Expand Up @@ -65,15 +65,10 @@ RUN --mount=type=bind,target=.,rw \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends --fix-missing \
curl \
gnupg \
software-properties-common \
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends --fix-missing \
build-essential \
ca-certificates \
curl \
gnupg \
tzdata \
locales \
git \
Expand Down
15 changes: 3 additions & 12 deletions hack/docker/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,12 @@ RUN {{RunMounts .RunMounts}} \
&& apt-get clean \
&& apt-get update -y \
&& apt-get upgrade -y \
{{- if eq (ContainerName .ContainerType) "%s"}}
&& apt-get install -y --no-install-recommends --fix-missing \
curl \
gnupg \
software-properties-common \
&& add-apt-repository ppa:ubuntu-toolchain-r/test -y \
&& apt-get update -y \
&& apt-get upgrade -y \
{{- end}}
&& apt-get install -y --no-install-recommends --fix-missing \
build-essential \
ca-certificates \
{{- if not (eq (ContainerName .ContainerType) "%s")}}
curl \
{{- if eq (ContainerName .ContainerType) "%s"}}
gnupg \
{{- end}}
tzdata \
locales \
Expand Down Expand Up @@ -144,7 +136,6 @@ ENTRYPOINT [{{Entrypoint .Entrypoints}}]
ENTRYPOINT ["{{.BinDir}}/{{.AppName}}"]
{{- end}}
{{- end}}`, DevContainer.String(), CIContainer.String(),
DevContainer.String(),
DevContainer.String(),
DevContainer.String(), CIContainer.String(),
DevContainer.String(), CIContainer.String())
Expand Down Expand Up @@ -239,7 +230,7 @@ const (
defaultBuildStageName = "builder"
maintainerKey = "MAINTAINER"
minimumArgumentLength = 2
ubuntuVersion = "22.04"
ubuntuVersion = "24.04"

goWorkdir = "${GOPATH}/src/github.com"
rustWorkdir = "${HOME}/rust/src/github.com"
Expand Down

0 comments on commit 3d51a12

Please sign in to comment.