Skip to content

Specify the source mapping path for component containers #17

Closed
@l0rd

Description

@l0rd

Currently, project source is mounted to either CHE_PROJECT_ROOT or /projects when mountSources is true. The CHE_PROJECT_ROOT value is configurable during Che setup via the che.properties file

If odo is to consume the devfiles, we would like it to have an alternate way to set the source path value in the component container, rather than having a fixed single value via either CHE_PROJECT_ROOT or /projects for all the devfiles.

This can be achieved by having sourceMapping when mountSources is true, which transfers/mounts the project to the specified path in the container.

Che can also use the property i.e.; when sourceMapping is present, it overrides the CHE_PROJECT_ROOT value if present and mounts the source to the path defined by sourceMapping

Example:

---
components:
  - container:
      image: "busybox"
      name: "mycontainer"
      mountSources: true
      sourceMapping: "/home/src"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiEnhancement or issue related to the api/devfile specification

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions