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: 4 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 (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T18:50:17.000Z (about 3 years ago)
- Last Synced: 2025-06-02T11:19:20.512Z (12 months ago)
- Topics: ballerina, codespaces, github-codespaces, remote-containers, vscode
- Language: Dockerfile
- Homepage: https://ballerina.io
- Size: 75.2 KB
- Stars: 4
- Watchers: 0
- 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.