9.2. How to Devcontainer

The devcontainer setup is a convenient way to develop the EVerest project. It uses Docker to create a development environment that is consistent across different machines. This section describes how to set up the devcontainer for the EVerest project and how to use it.

9.2.1. Prerequisites

You need to install docker, docker-compose and visual studio code.

9.2.2. Create devcontainer based EVerest workspace

9.2.2.1. Enter the workspace directory

Create a new directory and navigate into it. This directory will be your new workspace. (You could also use an existing one.)

mkdir my_workspace
cd my_workspace

9.2.2.2. Run the setup script

Run the following command to setup the devcontainer.

export BRANCH="main" && bash -c "$(curl -s --variable %BRANCH=main --expand-url https://raw.githubusercontent.com/EVerest/everest-dev-environment/{{BRANCH}}/devcontainer/setup-devcontainer.sh)"

The script will ask you for the following information:

  1. Workspace directory: Default is the current directory. You can keep the default by pressing enter.

  2. everest-dev-environment version: Default is ‘main’. You can keep the default by pressing enter.

9.2.2.3. Open the workspace in Visual Studio Code

After the script has finished, open the workspace in Visual Studio Code.

code .

VS Code will ask you to reopen the workspace in a container. Click on the button “Reopen in Container).

9.2.2.4. Getting started

As your set up dev environment suggests when you open a terminal, you can setup your EVerest workspace by running the following command:

everest clone everest-core

9.2.3. The Everest’s Development Tool

Note

A more detailed documentation of the tool is coming soon.

The Everest’s development tool is a command-line tool that helps you to manage your EVerest workspace. You can use it to clone repositories and start/stop services.