-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature to introduce Dev Containers #1001
Changes from all commits
24339f7
39cbad7
3ff6e0f
0970265
f79deb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "20.0.0" | ||
}, | ||
"ghcr.io/devcontainers/features/aws-cli:1": {}, | ||
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": { | ||
"version": "2.133.0" | ||
} | ||
}, | ||
"postCreateCommand": ".devcontainer/postCreateCommand.sh", | ||
"workspaceFolder": "/home/vscode/cdk-eks-blueprints", | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/home/vscode/cdk-eks-blueprints,type=bind", | ||
"hostRequirements": { | ||
"cpus": 2 | ||
}, | ||
"remoteEnv": { | ||
"PATH": "${containerEnv:PATH}:/home/vscode/cdk-eks-blueprints" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# For Kubectl AMD64 / x86_64 | ||
[ $(uname -m) = x86_64 ] && curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
# For Kubectl ARM64 | ||
[ $(uname -m) = aarch64 ] && curl -sLO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" | ||
chmod +x ./kubectl | ||
sudo mv ./kubectl /usr/local/bin/kubectl | ||
|
||
# For Helm | ||
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | ||
chmod 700 get_helm.sh | ||
echo "Installing 'helm' utility ..." | ||
./get_helm.sh | ||
rm -rf get_helm.sh | ||
|
||
# setup autocomplete for kubectl and alias k | ||
mkdir $HOME/.kube | ||
chsh -s $(which zsh) | ||
echo "source <(kubectl completion bash)" >> $HOME/.zshrc | ||
echo "alias k=kubectl" >> $HOME/.zshrc | ||
echo "alias cdk='npx cdk'" >> $HOME/.zshrc | ||
echo "complete -F __start_kubectl k" >> $HOME/.zshrc | ||
|
||
# Add Tools for Syntax Highlighting, Auto Suggestions, command shortcurts with oh-my-zsh for AWS, Kubectl, Node, Git. | ||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing CDK command. Try running cdk list or anything like. lets set an alias cdk="npx cdk" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. But ideally you should not be pre appending |
||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting | ||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | ||
sed -i "/plugins=(git)/c 'plugins=(git docker kubectl zsh-syntax-highlighting zsh-autosuggestions zsh-interactive-cd node aws)'" ~/.zshrc | ||
source ~/.zshrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on reset container getting the same error "workspace does not exist, rerun as root"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, never faced this.