News

'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

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube