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.
Click “Get Started”. Enter the full GitHub URL of your project.
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
As a next step, it allows you to open the project inside the Dev Environment container.
Next, it opens VS Code inside the dev environment container. Click on “Open in VS Code”.
Viewing in Docker Dashboard
Accessing the CLI
Running the Slack Clone app
Forwarding the port 3000
Accessing the Slack UI
You can open up https://localhost:3000
to access the Slack app.
What’s Next?
Read this detailed blog on how you can share your code with your development team.
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.