code-server: add terraform

This commit is contained in:
Roxedus
2021-12-29 23:44:24 +01:00
parent 413aa5129f
commit 584f87b7a9
9 changed files with 27 additions and 78 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
source /etc/lsb-release
[[ ! -f "/etc/apt/sources.list.d/hashicorp.list" ]] &&
curl -s https://apt.releases.hashicorp.com/gpg | apt-key add - &&
echo "deb https://apt.releases.hashicorp.com ${DISTRIB_CODENAME} main" \
>/etc/apt/sources.list.d/hashicorp.list
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
apt-get update
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
echo "**** Installing Terraform"
apt-get install -y \
terraform
install-extension hashicorp.terraform
-27
View File
@@ -1,27 +0,0 @@
#!/usr/bin/with-contenv bash
# Determine if setup is needed
if [ ! -f /usr/local/lib/python***/dist-packages/sshuttle ] && \
[ -f /usr/bin/apt ]; then
## Ubuntu
apt-get update
apt-get install --no-install-recommends -y \
iptables \
openssh-client \
python3 \
python3-pip
pip3 install sshuttle
fi
if [ ! -f /usr/lib/python***/site-packages/sshuttle ] && \
[ -f /sbin/apk ]; then
# Alpine
apk add --no-cache \
iptables \
openssh \
py3-pip \
python3
pip3 install sshuttle
fi
chown -R root:root /root
chmod -R 600 /root/.ssh
-3
View File
@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
sshuttle --dns --remote root@${HOST}:${PORT} 0/0 -x 172.17.0.0/16