How to easily manage containers with Microsoft VSS Code

Microsoft's VSS Code offers a pretty handy means of managing your Docker containers. Jack Wallen shows you how to add this feature to the free code editor.

How to easily manage containers with Microsoft VSS Code

VSS Code is the free source code editor by Microsoft. For many developers, this is one of the finest editors available. And with an extensive repository of plugins, it's easy to make this editor do exactly what you need. 

For instance, take the Docker extension, which makes it easy to build and manage containerized applications. With the Docker extension you can create and edit Docker files, run containers, connect to registries (such as DockerHub), and more. In fact, running a container from within VSS Code is incredibly simple. 

Let's install this extension and then deploy a container. 

To install the extension, you must first have both Docker and VSS Code installed and running. Follow these steps:

  1. Open VSS Code and click on the Extensions tab. 
  2. Type @docker to list the available extensions and then click the Docker listing. 
  3. Click the Install button and the extension will install. You'll now see a Docker icon in the left sidebar. 
  4. Click on that icon to see your containers, images, registries, and volumes. Although you can't pull images directly from VSS Code, it will display those you've pulled from the command line. 

Say you've pulled the NGINX image and want to deploy a container. To do that, expand the NGINX entry under IMAGES and then right-click the tag (such as latest). 

From the drop-down, click Run. You should see, in the bottom-right pane, the command and its successful output.

 To verify the container has been deployed, point a browser to the IP address of the machine hosting VSS Code and you should see the NGINX welcome page. 

If you find there's a problem, you can right-click the container entry, select View Logs or Inspect to gain insight into what might be causing the issues. And that's all there is to adding Docker container management to VSS Code. 

Although this isn't a one-stop-shop for your Docker container deployment needs, it's a really handy way to work with containers.

Also see


Image: iStockphoto/DragonImages