dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

[ubuntu-dev] install additional plugins into cloud9 sdk

Open jankeromnes opened this issue 8 years ago • 3 comments

We should install additional plugins into our Cloud9 SDK folder, e.g.:

  • [ ] https://github.com/shadowcodex/c9.ide.desktop
  • [x] https://github.com/nt1m/c9.ide.reviewcomments
  • [ ] and more plugins to implement the project-agnostic parts of https://github.com/JanitorTechnology/janitor/issues/30

Project-specific plugins should be installed by each project-specific Dockerfile (e.g. servo.dockerfile could install some plugins that set up Servo-specific contribution workflows, for example).

This can be done by importing this file into our ubuntu-dev image, into the folder /home/user/.c9sdk/configs/: https://github.com/JanitorTechnology/c9-workspace-config/blob/master/client-workspace-janitor.js

EDIT: I started doing this in #34.

jankeromnes avatar Jul 05 '17 17:07 jankeromnes

This could be done with a patch a bit like this:

diff --git a/ubuntu-dev/ubuntu-dev.dockerfile b/ubuntu-dev/ubuntu-dev.dockerfile
index 7581471..f0b619c 100644
--- a/ubuntu-dev/ubuntu-dev.dockerfile
+++ b/ubuntu-dev/ubuntu-dev.dockerfile
@@ -175,16 +175,23 @@ RUN mkdir /home/user/.phacility \
  && echo "\n# Phabricator helper." >> /home/user/.bashrc \
  && echo "PATH=\"\$PATH:/home/user/.phacility/arcanist/bin\"" >> /home/user/.bashrc
 
 # Install Cloud9 and noVNC.
 RUN git clone https://github.com/c9/core.git /home/user/.c9sdk \
  && cd /home/user/.c9sdk \
+ && wget -O ./configs/client-workspace-janitor.js https://raw.githubusercontent.com/JanitorTechnology/c9-workspace-config/master/client-workspace-janitor.js \
+ && sudo chown user:user ./configs/client-workspace-janitor.js \
+ && cd /home/user/.c9sdk/plugins \
+ && git clone https://github.com/nt1m/ntim.c9.reviewcomments \
+ && git clone https://github.com/shadowcodex/c9.ide.desktop \
+ && cd .. \
  && ./scripts/install-sdk.sh \
  && git reset HEAD --hard \
  && npm install -g c9
diff --git a/ubuntu-dev/supervisord.conf b/ubuntu-dev/supervisord.conf
index 38a54e7..b80152e 100644
--- a/ubuntu-dev/supervisord.conf
+++ b/ubuntu-dev/supervisord.conf
@@ -7,7 +7,7 @@ user = user
 command = sudo /usr/sbin/sshd -D
 [program:c9sdk]
 user = user
-command = /home/user/.c9sdk/server.js --auth : --listen 0.0.0.0 --packed --port 8089 -w /home/user
+command = /home/user/.c9sdk/server.js --auth : --listen 0.0.0.0 --packed --port 8089 --workspace-type=janitor -w /home/user
 [program:xvfb]
 user = user
 command = /usr/bin/Xvfb :99 -screen 0 1280x864x16 -ac -pn -noreset

jankeromnes avatar Jul 05 '17 17:07 jankeromnes

The "Reviews" plugin was installed in cf3ebf7073d740674b2cb929ac27ad64081c5f3c / #34.

jankeromnes avatar Jul 10 '17 15:07 jankeromnes

We should also add the following user configurations to our Cloud9 workspace type:

  • [ ] Code editor font-size: 14 (instead of 12)
  • [ ] Default indentation to 2 spaces (instead of 4 spaces)
  • [ ] Strip trailing spaces on save by default
  • [ ] Show hidden files by default in the file explorer (like our dotfile configuration templates)

jankeromnes avatar Jul 28 '17 15:07 jankeromnes