'Docker for Visual Studio Code' Tool Generally Available in Version 1.0

Microsoft shipped version 1.0 of the extension for Visual Studio Code used to build applications that use Docker containers, adding support for an experimental Windows Subsystem for Linux 2 (WSL 2) engine among a slew of new features.

The Docker for Visual Studio Code extension in the VS Code Marketplace helps developers build, manage and deploy containerized applications from the popular cross-platform, open-source code editor. Though it was initially released way back in 2015, it was just updated last week.

"The extension helps scaffold needed files, build Docker images, debug your app inside a container, and an explorer that makes it easy to take actions on containers and images such as start, stop, inspect, remove, and more," said Mike Morton, program manager, in a blog post today (March 16).

One of the new features lets developers enable WSL 2 support in applicable Windows versions by surfacing the WSL 2 experimental engine in Docker Desktop. It uses WSL 2 instead of HyperV to run Linux containers, functionality that was actually included in version 0.9.0. "The use of WSL 2 is supported and encouraged!" Morton said.

Docker for Visual Studio Code
[Click on image for larger view.] Docker for Visual Studio Code (source: Microsoft).

Other highlights of version 1.0 include:

  • Dockerfile scaffolding: In response to developer feedback about improving initial Dockerfile scaffolding, coders now have the ability to choose Django (Python-based web framework) or Flask (Python microframework) when they add a Docker file to a workspace. "Based on your response we'll scaffold the appropriate Dockerfile, debugging tasks, and launch configurations. Don't worry, we still support a 'General' option as well if you want a more generic Dockerfile."
  • Choice of Docker Compose or Dockerfile: These are options for starting container services, which can be done with Docker Compose for scenarios requiring certain functionality or with just a Dockerfile for less-complicated situations. "The Docker extension now supports using either a Compose.yml file or only a Dockerfile. Additionally, for Node.js, Python, and .NET Core we support integrated debugging of a single service using a Dockerfile."
  • Customized commands: Developers can now customize many of the extension's commands executed via the command palette or context menus in the explorer. "For example, when you run an image, you can now have the extension put the resulting container on a specific network. See the documentation for details on what commands can be customized."
  • Command multiple containers or images: Developers can now execute commands on multiple containers or images, simplifying the process of starting or stopping more than one container at a time or running and removing images. "You can now select multiple containers or images and then use the context menu to execute a command on all the selected items. In addition, if you run a command from the command palette, such as 'Docker Containers: Start' you will see a list of all of the containers that can be started with a checkbox next to each."

Several other new features were also announced in the blog post, affecting debugging, scaffolding and more.

The extension has been installed more than 4 million times, making it a Top 10 tool in the "Programming Languages" section of the VS Code marketplace. Forty-seven developers have reviewed the extension, giving it an average rating of 4.6 out of 5. The tool is developed on GitHub.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus


Subscribe on YouTube