Skip to content

Ballerina language development environment for VS Code Remote - Container's extension and for GitHub Codespaces.

License

Notifications You must be signed in to change notification settings

Asitha/vscode-remote-try-ballerina

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 or Visual Studio Code 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. Open in codespaces
  2. Select + New codespace at the bottom on the pane.

For more info, check out the GitHub documentation.

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.

  2. Use this template repository to create a Ballerina project repository Use This Template

  3. Clone the newly created repository to your local filesystem.

  4. Press F1 and select the Remote-Containers: Open Folder in Container... command. Open folder in container

  5. 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.

$ bal init

Create a Ballerina module with

$ bal add <module_name>

Using a specific container with an older Ballerina version

Update the .devcontainer/devcontainer.json file to switch the Ballerina version of the container

{
	"name": "Ubuntu",
	"build": {
		"dockerfile": "Dockerfile",
		"args": { "VARIANT": "<IMAGE_TAG_GOES_HERE>" }
	},
...

You can check the docker hub ballerina-dev registry for released Ballerina dev containers.

NOTE: Base docker image for the dev container is maintained at VS Code Remote Ballerina-Dev Docker repository.

About

Ballerina language development environment for VS Code Remote - Container's extension and for GitHub Codespaces.

Topics

Resources

License

Stars

Watchers

Forks