Welcome to the Teleporte Compose documentation. Here you'll find all the information you need to understand, install, and use this project.
Important
Our documentation is a work in progress. Please be patient or feel free to contribute.
This project aims to offer an Internal Developer Platform for educational purposes, but it can also be adapted for other uses.
To install this project, please refer to the root README.
To use DevContainers with VSCode, you first need to install the "Dev Containers" extension or the "Remote Development Extension Pack". These extensions allow you to work with containers, virtual machines, or remote environments directly from VSCode.
- Here are two common use cases for DevContainers with VSCode:
- Attaching VSCode to a running container
- Using a DevContainer defined in a Git repository
Tip
DevContainers combined with VSCode offer a powerful way to standardize development environments within a team, while retaining the benefits of working with a full local IDE. Feel free to explore the different DevContainer configuration options to adapt them to your specific needs. The official VSCode documentation is an excellent resource to go further.
- To attach a DevContainer to a running container, follow these steps:
- Make sure you have the "Dev Containers" extension or the "Remote Development Extension Pack" installed in your VS Code.
- Open the Command Palette in VS Code (Ctrl+Shift+P or Cmd+Shift+P on macOS).
- Type "Remote-Containers: Attach to Running Container" and select it from the list.
- VS Code will display a list of running containers. Choose the container you want to attach to.
- After selecting the container, VS Code will reload and attach itself to the running container.
- You can now interact with the container through the VS Code interface, edit files, run commands, and debug your application as if it were running locally.
Tip
By attaching a DevContainer to a running container, you can leverage the isolated environment and specific dependencies of the container while still using your preferred IDE. This approach is particularly useful when working with existing containers or when you need to quickly debug an issue in a containerized environment.
You can easily attach VSCode to a Docker container already running on your machine. This allows you to develop within the isolated environment of the container.
-
To see how to do this in detail, watch this video:
Partage.d.ecran.-.2024-06-07.14.h.26.min.33.s.mp4
If you have a project directory that includes a devcontainer.json
file, you can easily open it in a DevContainer using VS Code. The devcontainer.json
file defines the configuration for the development environment, including the base image, VS Code settings, extensions, and more. To open the directory in a DevContainer, follow these steps:
- Ensure that you have the "Dev Containers" extension or the "Remote Development Extension Pack" installed in your VS Code.
- Open the project directory in VS Code either by using the "File > Open Folder" menu or by running the
code /path/to/your/project
command in your terminal. - Once the directory is opened in VS Code, you should see a notification in the lower right corner indicating that a DevContainer configuration file has been detected.
- Click on the "Reopen in Container" button in the notification or open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P on macOS) and select "Remote-Containers: Reopen in Container".
- VS Code will build the DevContainer based on the configuration in the
devcontainer.json
file and reopen the directory inside the container. - After the build process is complete, you can start developing within the DevContainer environment. Any extensions specified in the configuration will be automatically installed, and the settings will be applied.
Tip
By using a devcontainer.json
file, you can ensure that everyone working on the project has the same development environment, regardless of their local setup. This approach helps to minimize environment-related issues and makes it easier for new team members to start contributing to the project quickly.
Many projects include a DevContainer configuration directly in their Git repository (as in the example in the code/node/test-app/
folder). This allows all developers to work in a standardized environment.
-
To learn how to use such a configuration, follow the tutorial in this video:
Partage.d.ecran.-.2024-06-07.14.h.22.min.37.s.mp4
The DevContainers specification is an open standard that allows you to consistently define and share development environments across different tools and platforms. By leveraging this specification, you can ensure that all developers within a project have access to the same setup, regardless of their local environment. The specification supports a wide range of features, such as specifying the base image, configuring VS Code settings, installing extensions, and more. Adopting the DevContainers specification can greatly simplify the onboarding process for new team members and reduce the time spent on environment-related issues.
Contributions are welcome! Please read the contribution guidelines for more details.
This project is licensed under the AGPLv3 license. See the LICENSE file for details.