From cbb7e0edc5b397124686c9d634c8c70af6578a25 Mon Sep 17 00:00:00 2001 From: Misra Aditya Date: Thu, 15 Feb 2024 11:54:23 +0800 Subject: [PATCH] Add devcontainer support --- .devcontainer/Dockerfile | 2 ++ .devcontainer/devcontainer.json | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..2f1c936 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,2 @@ +ARG VARIANT="jammy" +FROM mcr.microsoft.com/devcontainers/base:0-${VARIANT} \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..339ab86 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,39 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu +{ + "name": "WATcher Ubuntu DevBox", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "build": { + "dockerfile": "Dockerfile", + "args": { + "VARIANT": "ubuntu-22.04" + } + }, + "features": { + "git": "latest", + "node": "lts", + "ghcr.io/meaningful-ooo/devcontainer-features/fish": "latest" + }, + + // 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": [8080], + + //Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install -g markbind-cli", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": ["esbenp.prettier-vscode", "yzhang.markdown-all-in-one"], + "settings": { + "editor.formatOnSave": true + } + } + }, + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + "remoteUser": "vscode" +}