Skip to content

Commit f68124e

Browse files
committed
Added scripts, doesn't work yet
1 parent fb5cf14 commit f68124e

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ RUN su node -c "npm install -g pnpm"
3030
# RUN python -m pip install --upgrade pip wheel pipenv poetry && \
3131
# poetry config virtualenvs.create false
3232

33-
33+
COPY .devcontainer/install-scripts.sh /tmp/
34+
RUN cd /tmp && bash ./install-scripts.sh
3435

3536
ENV PORT=8080
3637
EXPOSE $PORT

.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
"streetsidesoftware.code-spell-checker",
5656
"dbaeumer.vscode-eslint",
5757
"esbenp.prettier-vscode",
58-
"ms-vscode-remote.remote-containers"
58+
"ms-vscode-remote.remote-containers",
59+
"ms-kubernetes-tools.vscode-kubernetes-tools",
60+
"redhat.vscode-tekton-pipelines"
5961
]
6062
}
6163
},

.devcontainer/install-scripts.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# Adapted from script by John J. Rofrano
3+
######################################################################
4+
5+
echo "**********************************************************************"
6+
echo "Establishing Architecture..."
7+
echo "**********************************************************************"
8+
# Convert inconsistent architectures (x86_64=amd64) (aarch64=arm64)
9+
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
10+
echo "Architecture is:" $ARCH
11+
12+
echo "**********************************************************************"
13+
echo "Installing kubectl..."
14+
echo "**********************************************************************"
15+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$ARCH/kubectl"
16+
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
17+
rm kubectl
18+
19+
20+
21+
echo "**********************************************************************"
22+
echo "Installing K9s..."
23+
echo "**********************************************************************"
24+
curl -L -o k9s.tar.gz "https://github.com/derailed/k9s/releases/download/v0.32.7/k9s_Linux_$ARCH.tar.gz"
25+
tar xvzf k9s.tar.gz
26+
sudo install -c -m 0755 k9s /usr/local/bin
27+
rm k9s.tar.gz
28+
29+
echo "**********************************************************************"
30+
echo "Installing Tekton CLI..."
31+
echo "**********************************************************************"
32+
if [ $ARCH == amd64 ]; then
33+
curl -L https://github.com/tektoncd/cli/releases/download/v0.38.1/tkn_0.38.1_Linux_x86_64.tar.gz --output tekton.tar.gz
34+
else
35+
curl -L https://github.com/tektoncd/cli/releases/download/v0.38.1/tkn_0.38.1_Linux_aarch64.tar.gz --output tekton.tar.gz
36+
fi;
37+
tar xvzf tekton.tar.gz tkn
38+
sudo install -c -m 0755 tkn /usr/local/bin
39+
rm tekton.tar.gz tkn

0 commit comments

Comments
 (0)