This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add bun devcontainer #1526
Closed
Closed
Add bun devcontainer #1526
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <your-package-list-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "Bun", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick an Debian OS version: bullseye, buster | ||
"args": { | ||
"VARIANT": "bullseye" | ||
} | ||
}, | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
README.md | ||
.npmignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <kbd>F1</kbd> 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 <kbd>F1</kbd> 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 <kbd>F1</kbd>, and select **Remote-Containers: Open | ||
Folder in Container...** | ||
1. Select the `containers/bun` folder. | ||
1. After the folder has opened in the container, press <kbd>Ctrl-Shift-`</kbd> | ||
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). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
sh
would start to fail since bun.sh changed the curl command tobash
.Refer the working devcontainer from @alertbox/vscode-remote-try-bun