Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloud-based IDE for Docker-based projects?

I want to start converting some of my existing projects over to using Docker - mainly to improve the ease with which new developers can get started working and reduce environment-related bugs when deploying to production (I once had an issue where code worked perfectly in dev and staging only to find out that production had an out-dated version of MySQL)

The problem is that I like working with cloud-based IDEs. I currently use Cloud9, although I've started looking at CodeAnywhere and Codenvy recently to see if they'll fit my needs (so far: uncertain)

The problem I'm running into is that Docker doesn't seem to play nicely with many cloud-based IDEs.

  • On Cloud9, your project (and associated repository) reside in a "workspace". One workspace is a Docker container running in non-privileged mode, so you cannot run Docker while within the workspace. This means any environment dependencies (Python, PHP, MySQL, etc) must be installed directly to the workspace OS
  • CodeAnywhere similarly creates a "container" -- a Docker container where your code runs, and within which you cannot run Docker
  • Codenvy seems a little closer to what I want, in that a "workspace" may consist of multiple "machines". This reminds me very much of a docker-compose.yml file. Your workspace may contain a database machine, a redis cache machine, and a PHP machine. However their hierarchy then places "projects" (and associated repositories) as a child of "workspaces" -- rather than the environment definition (and docker-compose.yml file) being a child of the project

The first two both support some notion of "SSH workspaces" -- instead of connecting to a container hosted by them, you can spin up a VM and connect to it directly. While this would allow me to run Docker, at a first glance it suffers one of two serious issues:

  1. Every project resides in a single "workspace" - making it difficult from the IDE to keep work separate
  2. Every project has their own "workspace", meaning every project has their own VM - leading to large monthly costs

Is there some other cloud-based IDE that will solve my issues, or is there some other way to use one of these three cloud-base IDEs that will work for me?

like image 490
stevendesu Avatar asked Oct 17 '22 19:10

stevendesu


1 Answers

I asked this question in a few different places and not just here. After several months there has been no complete answer, but I have gained a bit more information that I would like to pass along to anyone who stumbles upon the same issue.

1. Regarding Cloud9 and CodeAnywhere

When spinning up a new SSH workspace, you can specify not only the host, but also the root folder for the workspace. This means you can create multiple workspaces on a single VM and keep everything nice and separate.

There are a few caveats:

  • In order to truly keep your workspaces separate, you must create a new user for each workspace. Otherwise someone in workspaceA can edit ../workspaceB/file
  • All workspaces will share the same disk space, so it's possible for someone working in one workspace to fill up the hard drive and cause issues for all other workspaces
  • There's no easy way to spin up new workspaces. You have to log into the VM as an administrative user, create a new user, create a directory for the workspace, assign permissions, then set up a new SSH workspace. It may be possible to automate a large portion of this, though

2. Regarding CodeAnywhere specifically

CodeAnywhere promised full Docker support in Q4 of 2018. I've been waiting and haven't seen it yet. Keep your fingers crossed.

3. An alternate service

Now in 2018 there are over 50 cloud-based IDEs. Everyone and their mother is making a "me too" business. So it stands to reason that at least one of them will work. While I haven't gone around trying them all, I did hear from someone that OpenShift supports Docker.

like image 101
stevendesu Avatar answered Oct 21 '22 01:10

stevendesu