mirror of https://github.com/kubernetes/kops.git
devcontainer: update go version, use features
From what I've read, we want the base image to be smaller, with more of the added functionality in features. We can build a bigger image with the features, but that should be an image for devcontainers. Also it seems that devcontainer tooling will cache the image with the features - maybe giving similar results to if we had built a more complete image.
This commit is contained in:
parent
907a9a7203
commit
dac4fd91b0
|
|
@ -3,7 +3,8 @@
|
||||||
"name": "Kops environment from dev container",
|
"name": "Kops environment from dev container",
|
||||||
// Image to pull when not building from scratch. See .devcontainer/build/devcontainer.json
|
// Image to pull when not building from scratch. See .devcontainer/build/devcontainer.json
|
||||||
// and .github/devcontainer-build-and-push.yml for the instructions on how this image is built
|
// and .github/devcontainer-build-and-push.yml for the instructions on how this image is built
|
||||||
"image": "registry.k8s.io/build-image/kube-cross:v1.29.0-go1.21.3-bullseye.0",
|
"image": "debian:bullseye",
|
||||||
|
// "image": "registry.k8s.io/build-image/kube-cross:v1.30.0-go1.22.0-bullseye.0",
|
||||||
// Setup the go environment and mount into the dev container at the expected location
|
// Setup the go environment and mount into the dev container at the expected location
|
||||||
"workspaceFolder": "/go/src/k8s.io/kops",
|
"workspaceFolder": "/go/src/k8s.io/kops",
|
||||||
"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/k8s.io/kops,type=bind,consistency=cached",
|
"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/k8s.io/kops,type=bind,consistency=cached",
|
||||||
|
|
@ -17,10 +18,21 @@
|
||||||
"otherPortsAttributes": {
|
"otherPortsAttributes": {
|
||||||
"onAutoForward": "silent"
|
"onAutoForward": "silent"
|
||||||
},
|
},
|
||||||
"remoteUser": "root"
|
"remoteUser": "root",
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
// "customizations": {
|
// "customizations": {
|
||||||
// },
|
// },
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/github-cli:1": {
|
||||||
|
"installDirectlyFromGitHubRelease": true,
|
||||||
|
"version": "latest"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/go:1": {
|
||||||
|
"version": "latest"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
# Copies over welcome message
|
# Copies over welcome message
|
||||||
|
mkdir -p /usr/local/etc/vscode-dev-containers/
|
||||||
cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt
|
||||||
|
|
||||||
git remote add upstream https://github.com/kubernetes/kops.git
|
git remote add upstream https://github.com/kubernetes/kops.git
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue