Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asitha/vscode-remote-try-ballerina
Ballerina language development environment for VS Code Remote - Container's extension and for GitHub Codespaces.
https://github.com/asitha/vscode-remote-try-ballerina
ballerina codespaces github-codespaces remote-containers vscode
Last synced: about 2 months ago
JSON representation
Ballerina language development environment for VS Code Remote - Container's extension and for GitHub Codespaces.
- Host: GitHub
- URL: https://github.com/asitha/vscode-remote-try-ballerina
- Owner: Asitha
- License: apache-2.0
- Created: 2021-01-30T07:28:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T18:50:17.000Z (almost 2 years ago)
- Last Synced: 2024-11-08T14:59:55.637Z (3 months ago)
- Topics: ballerina, codespaces, github-codespaces, remote-containers, vscode
- Language: Dockerfile
- Homepage: https://ballerina.io
- Size: 75.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VSCode Ballerina Development Container
A development container is a running Docker container with a well-defined tool/runtime stack and its prerequisites. You can try out development containers with [GitHub Codespaces](https://github.com/features/codespaces) or [Visual Studio Code Remote - Containers](https://aka.ms/vscode-remote/containers).
This is a template project for Ballerina language with VS Code development containers.
## Setting up the development container
## Open in Github Codespaces
Follow these steps to open this sample in a Codespace:1. Click the Code drop-down menu and select the Open with Codespaces option.

2. Select + New codespace at the bottom on the pane.For more info, check out the [GitHub documentation](https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace#creating-a-codespace).
## VS Code Remote - Containers
Follow these steps to open this sample in a container using the VS Code Remote - Containers extension:
1. If this is your first time using a development container, please ensure your system meets the pre-reqs (i.e. have Docker installed) in the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started).
1. Use this template repository to create a Ballerina project repository

2. Clone the newly created repository to your local filesystem.
3. Press F1 and select the **Remote-Containers: Open Folder in Container...** command.

4. Select the cloned copy of this folder, wait for the container to start, and try things out!## Create a Ballerina project
To create a Ballerina project open up the terminal in VSCode (`Terminal -> New Terminal` ). Then use the following command to create your Ballerina project.
```bash
$ bal init
```
Create a Ballerina module with
```bash
$ bal add
```
----## Using a specific container with an older Ballerina version
Update the .devcontainer/devcontainer.json file to switch the Ballerina version of the container
```json
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
"args": { "VARIANT": "" }
},
...
```You can check the docker hub [ballerina-dev](https://hub.docker.com/repository/docker/asithan/ballerina-dev/tags?page=1&ordering=last_updated) registry for released Ballerina dev containers.
> NOTE: Base docker image for the dev container is maintained at [VS Code Remote Ballerina-Dev Docker](https://github.com/Asitha/vscode-remote-ballerina-dev-container) repository.