Search code examples
shelldockersynchronizationcodenvyweb-ide

Bidirectionnal Sync with shell/terminal and actual code in Codenvy


I managed to create a working shell with the following runner:

FROM codenvy/shellinabox
RUN sudo apt-get update && sudo apt-get -y install g++ git htop ssh tmux vim python
VOLUME ["/home/user/app"]
ENV CODENVY_APP_BIND_DIR /home/user/app
CMD sleep 365d

This will sync changes from the Codenvy WebIDE to the terminal.

But it won't sync changes from the terminal to the Codenvy WebIDE(even if you attempt to refresh,close/open file, etc).


Solution

  • Note: I work for Codenvy...

    Bi-directional sync between the runtime and project files in the IDE is part of the next-generation Codenvy system which is now in beta. The only way to do it with the Codenvy version currently hosted at codenvy.com is to implement an extension for Codenvy that checks with a process in the runtime for changes.

    It would be easier to use the next generation system where this just works out-of-the-box - you can play with it by signing up for the beta at codenvy.com or (since Codenvy is based on the Eclipse Che open source project) you can download the 4.x version of Che and use it on your laptop.