Create new workspace cloud9 docker

Here are the steps to create a new workspace in Cloud9 using Docker:

Prerequisites:

Step 1: Create a new workspace

  1. Log in to your Cloud9 account and click on the "Create a new workspace" button.
  2. Choose "Docker" as the workspace type.
  3. Enter a name for your workspace (e.g., "my-new-docker-workspace").
  4. Choose a Docker image (e.g., "ubuntu:latest" or "node:14").
  5. Click "Create workspace".

Step 2: Configure the Docker image

  1. In the "Configure your workspace" section, you can customize the Docker image by adding environment variables, volumes, and ports.
  2. For example, you can add an environment variable NODE_ENV=development to set the Node.js environment to development.
  3. You can also add a volume to persist data between container restarts.
  4. Click "Create workspace" to create the workspace.

Step 3: Start the Docker container

  1. Once the workspace is created, click on the "Start" button to start the Docker container.
  2. The container will start, and you will see the terminal output in the Cloud9 interface.

Step 4: Access the Docker container

  1. You can now access the Docker container using the terminal in the Cloud9 interface.
  2. You can run commands, install dependencies, and write code in the container.
  3. You can also use the "Run" button to run a specific command in the container.

Step 5: Save and commit changes

  1. When you make changes to the code or dependencies in the container, you can save and commit the changes using the "Save" and "Commit" buttons.
  2. The changes will be persisted in the Docker image, and you can roll back to previous versions if needed.

That's it! You now have a new workspace in Cloud9 using Docker. You can use this workspace to develop and deploy your applications.