diff --git a/containers/bun/.devcontainer/Dockerfile b/containers/bun/.devcontainer/Dockerfile new file mode 100644 index 0000000000..6dd7c5d270 --- /dev/null +++ b/containers/bun/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +# [Choice] Debian OS version: bullseye, buster +ARG VARIANT=bullseye +FROM --platform=linux/amd64 mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} + +ENV BUN_INSTALL=/bun +RUN mkdir -p /bun \ + && curl -fsSL https://bun.sh/install | sh \ + && chown -R vscode /bun + +ENV PATH=${BUN_INSTALL}/bin:${PATH} \ + BUN_DIR=${BUN_INSTALL}/.cache/bun + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends diff --git a/containers/bun/.devcontainer/devcontainer.json b/containers/bun/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..81ac6186eb --- /dev/null +++ b/containers/bun/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +{ + "name": "Bun", + "build": { + "dockerfile": "Dockerfile", + // Update 'VARIANT' to pick an Debian OS version: bullseye, buster + "args": { + "VARIANT": "bullseye" + } + }, + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/containers/bun/.npmignore b/containers/bun/.npmignore new file mode 100644 index 0000000000..33e7c7bf3e --- /dev/null +++ b/containers/bun/.npmignore @@ -0,0 +1,2 @@ +README.md +.npmignore \ No newline at end of file diff --git a/containers/bun/README.md b/containers/bun/README.md new file mode 100644 index 0000000000..9677007c7f --- /dev/null +++ b/containers/bun/README.md @@ -0,0 +1,70 @@ +# Bun (Community) + +## Summary + +_Develop Bun applications. Includes the latest Bun runtime and extension._ + +| Metadata | Value | +| --------------------------- | ---------------------------- | +| _Contributors_ | @bherbruck | +| _Categories_ | Community, Languages | +| _Definition type_ | Dockerfile | +| _Supported architecture(s)_ | x86-64 | +| _Works in Codespaces_ | Yes | +| _Container host OS support_ | Linux, macOS, Windows | +| _Container OS_ | Debian | +| _Languages, platforms_ | Bun, TypeScript, JavaScript | + +## Using this definition + +1. If this is your first time using a development container, please see getting + started information on + [setting up](https://aka.ms/vscode-remote/containers/getting-started) + Remote-Containers or + [creating a codespace](https://aka.ms/ghcs-open-codespace) using GitHub + Codespaces. + +2. Start VS Code and open your project folder or connect to a codespace. + +3. Press F1 select and **Add Development Container Configuration + Files...** command for **Remote-Containers** or **Codespaces**. + + > **Note:** If needed, you can drag-and-drop the `.devcontainer` folder from + > this sub-folder in a locally cloned copy of this repository into the VS + > Code file explorer instead of using the command. + +4. Select this definition. You may also need to select **Show All + Definitions...** for it to appear. + +5. Finally, press F1 and run **Remote-Containers: Reopen Folder in + Container** or **Codespaces: Rebuild Container** to start using the + definition. + +## Testing the definition + +To verify the definition is working as expected on your system. Follow these +steps: + +1. If this is your first time using a development container, please follow the + [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) + to set up your machine. +1. Clone this repository. +1. Start VS Code, press F1, and select **Remote-Containers: Open + Folder in Container...** +1. Select the `containers/bun` folder. +1. After the folder has opened in the container, press Ctrl-Shift-` + to open a new terminal. +1. Run the following command to execute a simple application. + + ```bash + bun + ``` + +1. You should see "bun: a fast bundler, transpiler, JavaScript Runtime and package manager for web software." in the terminal. + +## License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Licensed under the MIT License. See +[LICENSE](https://github.com/microsoft/vscode-dev-containers/blob/main/LICENSE).