diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..5cee465925d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", + "name": "ClusterTool Cluster", + "image": "tccr.io/tccr/devcontainer:latest", + "initializeCommand": "docker pull tccr.io/tccr/devcontainer:latest", + "postCreateCommand": { + "setup": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh" + }, + "postStartCommand": { + "git": "git config --global --add safe.directory ${containerWorkspaceFolder}" + } + } diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000000..01edfdb3d9f --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +set -o noglob + +# Setup fisher plugin manager for fish and install plugins +/usr/bin/fish -c " +curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher +fisher install decors/fish-colored-man +fisher install edc/bass +fisher install jorgebucaran/autopair.fish +fisher install nickeb96/puffer-fish +fisher install PatrickF1/fzf.fish +" + +# Create/update virtual environment +if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then + rm -rf .venv +fi +task workstation:venv diff --git a/clustertool/embed/generic/root/DOTREPLACEdevcontainer/devcontainer.json b/clustertool/embed/generic/root/DOTREPLACEdevcontainer/devcontainer.json new file mode 100644 index 00000000000..5225815b33d --- /dev/null +++ b/clustertool/embed/generic/root/DOTREPLACEdevcontainer/devcontainer.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", + "name": "TrueCharts", + "image": "tccr.io/tccr/devcontainer:latest", + "initializeCommand": "docker pull tccr.io/tccr/devcontainer:latest", + "postCreateCommand": { + "setup": "bash ${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh" + }, + "postStartCommand": { + "git": "git config --global --add safe.directory ${containerWorkspaceFolder}" + } + } diff --git a/clustertool/embed/generic/root/DOTREPLACEdevcontainer/postCreateCommand.sh b/clustertool/embed/generic/root/DOTREPLACEdevcontainer/postCreateCommand.sh new file mode 100755 index 00000000000..01edfdb3d9f --- /dev/null +++ b/clustertool/embed/generic/root/DOTREPLACEdevcontainer/postCreateCommand.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -e +set -o noglob + +# Setup fisher plugin manager for fish and install plugins +/usr/bin/fish -c " +curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher +fisher install decors/fish-colored-man +fisher install edc/bass +fisher install jorgebucaran/autopair.fish +fisher install nickeb96/puffer-fish +fisher install PatrickF1/fzf.fish +" + +# Create/update virtual environment +if ! grep -q "venv /workspaces/" .venv/pyvenv.cfg; then + rm -rf .venv +fi +task workstation:venv