Accessing files in the dev container

You can use this procedure to safely create a dedicated folder within your dev container's file system. This is necessary when you need a controlled location to organize your code or clone Git repositories, ensuring you avoid deleting or removing existing critical files required by the container.

About this task

The development container has its own file system that you can fully utilize. However, you must not delete or remove existing files in the container, as they may be required by other services or configurations.

To organize your code or clone a repository, you can create a dedicated folder. Follow these steps in the Terminal view of your dev container:

Procedure

  1. Open the Terminal inside the dev container.
  2. Create a target directory for your code, for example:
    mkdir -p /usr/code/repos
  3. Navigate into the folder:
    cd /usr/code/repos
    You can now use this directory to clone Git repositories, manage code, or run builds as needed, all within the dev container’s isolated environment.