Skip to content

Commit

Permalink
Align devcontainer with etcd-io/etcd.
Browse files Browse the repository at this point in the history
Signed-off-by: James Blair <[email protected]>
Signed-off-by: liyang <[email protected]>
  • Loading branch information
jmhbnz authored and daviderli614 committed Dec 27, 2024
1 parent dcc52f3 commit deabf61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "Kubebuilder DevContainer",
"image": "golang:1.22",
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/git:1": {}
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {}
},

"runArgs": ["--network=host"],
Expand All @@ -22,4 +24,3 @@

"onCreateCommand": "bash .devcontainer/post-install.sh"
}

9 changes: 2 additions & 7 deletions .devcontainer/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ set -x

curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64
chmod +x ./kind
mv ./kind /usr/local/bin/kind
sudo mv ./kind /usr/local/bin/kind

curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64
chmod +x kubebuilder
mv kubebuilder /usr/local/bin/

KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl"
chmod +x kubectl
mv kubectl /usr/local/bin/kubectl
sudo mv kubebuilder /usr/local/bin/

docker network create -d=bridge --subnet=172.19.0.0/24 kind

Expand Down

0 comments on commit deabf61

Please sign in to comment.