From 2bb66c9c8b0605309eb75948b80658695ac5c871 Mon Sep 17 00:00:00 2001 From: Aison Date: Wed, 7 Feb 2024 00:21:10 +0800 Subject: [PATCH] init git --- .devcontainer/Dockerfile | 6 ++++++ .devcontainer/devcontainer.json | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 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..8cac3a3 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,6 @@ +FROM mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye +RUN useradd --groups sudo --no-create-home --shell /bin/bash node \ + && echo "node ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers.d/node \ + && chmod 0440 /etc/sudoers.d/node +RUN sh -c "$(curl -fsSL https://starship.rs/install.sh)" -y -f && echo 'eval "$(starship init bash)"' >> /home/node/.bashrc +RUN npm install cnpm -g && cnpm install tsx rimraf @antfu/ni -g \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..1c1c34a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node +{ + "name": "Ts Dev", + "build":{ + "dockerfile": "./Dockerfile" + }, + "workspaceFolder": "/workspace", + + // 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": "ni", + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "extensions": ["chenglou92.rescript-vscode"] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +}