Defining environment variables
Environment variables are supported by the following component types: container
, plugin
, kubernetes
, openshift
.
If the component has multiple containers, environment variables will be provisioned for each container.
Procedure
-
Specify environment variables for
container
componentsExample 1. Specify environment variables for acontainer
componentsschemaVersion: 2.0.0 metadata: name: MyDevfile components: - name: go container: image: golang memoryLimit: 512Mi mountSources: true command: ['sleep', 'infinity'] env: - name: GOPATH value: $(PROJECTS_ROOT)/go
-
Specify environment variables for
plugin
componentsExample 2. Specify environment variables for aplugin
componentschemaVersion: 2.0.0 metadata: name: MyDevfile - name: theia-editor plugin: id: eclipse/che-theia/next memoryLimit: 2Gi env: - name: HOME value: $(CHE_PROJECTS_ROOT)
|