From f4a2e0032b3529802b8e410ff051aef48f9f2ecd Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Fri, 22 Dec 2023 16:58:11 +0800 Subject: [PATCH] chore(global): setup devenv and configure VSC Signed-off-by: Andrei Jiroh Halili --- .devcontainer/Dockerfile | 17 +++++++++++++ .devcontainer/devcontainer.json | 45 +++++++++++++++++++++++++++++++++ .vscode/extensions.json | 6 +++++ .vscode/settings.json | 11 ++++++++ 4 files changed, 79 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..fbdb27a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM gitpod/workspace-python-3.12 + +ARG SHELLCHECK_VERSION=0.9.0 +ARG HADOLINT_VERSION=2.12.0 + +RUN curl -sSL https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository | sudo bash \ + && sudo install-packages github-cli glab pipx + +# Hadolint + ShellCheck setup w/o Homebrew +RUN sudo wget https://github.com/hadolint/hadolint/releases/download/v${HADOLINT_VERSION}/hadolint-Linux-x86_64 -O /usr/local/bin/hadolint \ + && wget \ + https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \ + -O /tmp/shellcheck-dist.tar.xz \ + && tar -C /tmp -xvf /tmp/shellcheck-dist.tar.xz shellcheck-v${SHELLCHECK_VERSION}/shellcheck \ + && sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ \ + && sudo chmod +x /usr/local/bin/hadolint /usr/local/bin/shellcheck \ + && rm /tmp/shellcheck* -rv \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..9423c44 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,45 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "Alpine", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "build": { + "dockerfile": "./Dockerfile" + }, + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "moby": true, + "azureDnsAutoDetection": true, + "installDockerBuildx": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/lukewiwa/features/wait-for-it:0": { + "host": "localhost" + }, + "ghcr.io/joshuanianji/devcontainer-features/github-cli-persistence:0": {} + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + "remoteUser": "gitpod", + "customizations": { + "vscode": { + "extensions": [ + "denoland.vscode-deno", + "laurencebahiirwa.deno-std-lib-snippets" + ] + } + } +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..943c275 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "denoland.vscode-deno", + "laurencebahiirwa.deno-std-lib-snippets" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..dc4f34b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "foam.openDailyNote.directory": "./docs/updates", + "foam.files.newNotePath": "currentDir", + "deno.enable": true, + "gitlens.remotes": [ + { + "domain": "mau.dev", + "type": "GitLab" + } + ] +} \ No newline at end of file -- 2.51.2