Eclipse Che: Can't find che.env

915 Views Asked by At

I'm trying to enable GitHub oAuth in Eclipse Che. The documentation calls for modification of che.env.

Further, the docs say:

Configuration is handled by modifying che.env placed in the host folder volume mounted to :/data. This configuration file is generated during the che init phase.

I run Eclipse Che in a docker container as follows:

mkdir /home/<USERNAME>/che
docker run -p 8080:8080 \
            --name che \
            --rm \
            -v /var/run/docker.sock:/var/run/docker.sock \
            -v /home/<USERNAME>/che:/data \
            eclipse/che-server:5.0.0-latest 

(Ref: http://www.eclipse.org/che/docs/setup/docker/index.html)

I enter the container and search for che.env:

docker exec -it <CONTAINER ID> bash
find /data -name 'che.env'

Nothing is returned, thus the file che.env doesn't exist in /data. Why?

2

There are 2 best solutions below

7
On

As per your docker run command, host folder mounted to volume :/data is /home/<USERNAME>/che so your che.env file must exist at path - /home/<USERNAME>/che/che.env

Update - Image used to run eclipse che is different in docker run command. eclipse/che image is required for running eclipse che. Complete command -

docker run -it --rm -v /che-data:/data -v /var/run/docker.sock:/var/run/docker.sock eclipse/che:5.17.0 start
0
On

It's in /home//che folder. Make sure you restart Che after making changes to the file