Merge pull request #432 from linuxserver/code-server-terraform-s6v3

switch to hybrid (code-server-terraform)
This commit is contained in:
aptalca 2022-09-04 21:23:24 -04:00 committed by GitHub
commit fcb92cb4ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 3 deletions

View File

@ -1,7 +1,7 @@
# Terraform - Docker mod for code-server
# Terraform - Docker mod for code-server/openvscode-server
This mod adds the Terraform binary and extension to code-server, to be installed/updated during container start.
This mod adds the Terraform binary and extension to code-server/openvscode-server, to be installed/updated during container start.
In code-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-terraform`
In code-server/openvscode-server docker arguments, set an environment variable `DOCKER_MODS=linuxserver/mods:code-server-terraform`
If adding multiple mods, enter them in an array separated by `|`, such as `DOCKER_MODS=linuxserver/mods:code-server-terraform|linuxserver/mods:code-server-zsh`

View File

@ -0,0 +1,15 @@
#!/usr/bin/with-contenv bash
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y gnupg
fi
if [ ! -f "/etc/apt/sources.list.d/hashicorp.list" ]; then
echo "**** Adding terraform packages to install list ****"
curl -s https://apt.releases.hashicorp.com/gpg | apt-key add -
source /etc/lsb-release
echo "deb https://apt.releases.hashicorp.com ${DISTRIB_CODENAME} main" > /etc/apt/sources.list.d/hashicorp.list
echo "terraform" >> /mod-repo-packages-to-install.list
else
echo "**** Terraform packages already installed, skipping ****"
fi

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-mod-code-server-terraform-add-package/run

View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
install-extension hashicorp.terraform

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-mod-code-server-terraform-install/run