Test drive Docker Dev Environments in 5 Minutes

Ajeet Singh Raina - Nov 4 '22 - - Dev Community

Dev Environments lets you create a configurable developer environment with all the code and tools you need to quickly get up and running. It helps in the following ways:

  • Uses a container locally as a full development environment.

  • Allows developers to share code (including dependencies) with your team members in one click.

  • Move quickly between branches or run them side by side in VSCode.

It uses tools built into code editors that allow Docker to access code mounted into a container rather than on your local host. This isolates the tools, files and running services on your machine allowing multiple versions of them to exist side by side.

Let us understand Docker Dev Environments by quickly test driving Slack Clone project repository. The project is hosted here.

Pre-requisite:

Getting Started

You can locate Dev Environments by
accessing the left pane of the Docker dashboard.

Image2

Click "Get Started". Enter the full GitHub URL of your project.

Image3

As soon as you click on "Continue" button, the following operations gets executed in the background:

  • It clones the repo inside a volume.
  • Determine the best image for your Dev environment
  • Installs Credential Helper
  • Clone the repository into '/com.docker.devenvironments.code’.
  • Runs .docker migration
  • It detects the main language of your repository
  • Brings up the container services

Image5

Now it allows you to open the project inside the Dev Environment container.

Image6

Next it opens VS Code inside the dev environment container. Click on "Open in VS Code".

Image7

Viewing in Docker Dashboard

Image8

Accessing the CLI

Image9

Running the Slack Clone app

Image10

Forwarding the port 3000

Image11

Accessing the Slack UI

You can open up https://localhost:3000 to access the Slack app.

Image12

References

Getting Help

Have a question about Dev Environments? Search the Docker Forum Dev Environment tag for answers, or post a question in our Docker Community Forum.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .