From 6235210e24d74851303cfc2e87c27c306b11f7fd Mon Sep 17 00:00:00 2001 From: John Freeman Date: Sat, 17 Feb 2024 23:01:00 +0000 Subject: [PATCH] Added Dev Container support For ease of development. --- .devcontainer/devcontainer.json | 61 +++++++++++++++++++++++++++++++++ .editorconfig | 4 +++ .github/dependabot.yml | 5 +++ 3 files changed, 70 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..ded25dd7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,61 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/debian +{ + "name": "development-environment", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:bookworm", + + "features": { + "ghcr.io/devcontainers/features/ruby:1": { + "version": "3.1" + }, + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": true, + "configureZshAsDefaultShell": true, + "installOhMyZsh": true + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": {}, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { + "packages": "fzf grc shellcheck shfmt zoxide" + }, + "ghcr.io/devcontainers-contrib/features/fd:1": {}, + "ghcr.io/devcontainers-contrib/features/ripgrep:1": {}, + "ghcr.io/devcontainers-contrib/features/starship:1": {}, + "ghcr.io/devcontainers-contrib/features/zsh-plugins:0": { + "plugins": "dirhistory docker fd fzf git-escape-magic gh git grc ripgrep starship sudo zoxide zsh-autosuggestions zsh-syntax-highlighting", + "omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-syntax-highlighting.git" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "donjayamanne.githistory", + "EditorConfig.EditorConfig", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "ldez.ignore-files", + "me-dutour-mathieu.vscode-github-actions", + "oderwat.indent-rainbow", + "streetsidesoftware.code-spell-checker", + "marcostazi.VS-code-vagrantfile", + "ginfuru.ginfuru-vscode-jekyll-syntax", + "timonwong.shellcheck", + "foxundermoon.shell-format" + ] + } + }, + + "remoteEnv": { + "PATH": "/home/vscode/.local/bin:${containerEnv:PATH}" + }, + + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [4000] + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.editorconfig b/.editorconfig index c26ae0e3..64f0883c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -21,3 +21,7 @@ end_of_line = lf # Match shfmt [*.sh] indent_style = tab + +# Follow VS Code defaults +[devcontainer.json] +indent_style = tab diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 16ea0280..a5b613d8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,8 @@ updates: schedule: interval: weekly day: saturday +- package-ecosystem: devcontainers + directory: "/" + schedule: + interval: weekly + day: saturday