Docker Extension for Visual Studio Code
Перейти к файлу
Brandon Waterloo [MSFT] 959987e807
Add some changelog info (#3651)
2022-10-17 16:43:12 -04:00
.azure-pipelines Add SBoM generation task (#3345) 2021-12-02 13:30:28 -05:00
.github Change bot (#3451) 2022-03-02 14:15:02 -05:00
.vscode Try moving back to `macOS-latest` (#3262) 2021-10-13 12:33:29 -04:00
resources Update to the targets file to get absolute Blazor manifest path (#3644) 2022-10-14 12:58:46 -04:00
src Cherry-pick Switch back to default .NET images (undo #2996, #3029) (#3516) (#3650) 2022-10-17 16:28:46 -04:00
.eslintrc.json New linter settings + mountain of linter error fixes (#2836) 2021-04-12 10:23:46 -04:00
.gitattributes Mark some files as generated (#3309) 2021-11-11 14:21:10 -05:00
.gitignore Use shared experimentation framework (#2432) 2020-10-23 12:37:05 -04:00
.vscodeignore Add a new Getting Started experience using the new walkthroughs feature (#3171) 2021-09-09 09:47:32 -04:00
CHANGELOG.md Add some changelog info (#3651) 2022-10-17 16:43:12 -04:00
CONTRIBUTING.md Change recommended extension in CONTRIBUTING (#1806) 2020-04-01 11:23:16 -04:00
LICENSE.md Updating readme file 2015-11-13 22:40:17 -08:00
NOTICE.html Update changelog and NOTICE file (#3558) 2022-06-28 12:49:36 -04:00
README.md Update readme to refer to new telemetry setting (#3376) 2022-01-11 12:58:28 -05:00
SECURITY.md Add security.md (#1802) 2020-04-01 12:40:15 -04:00
main.js Switch to Webpack Watch flavor of extension and relocate test code (#3078) 2021-07-20 13:10:33 -04:00
package-lock.json Update version and changelog for 1.22.2 release (#3643) 2022-10-14 12:58:33 -04:00
package.json Update version and changelog for 1.22.2 release (#3643) 2022-10-14 12:58:33 -04:00
package.nls.json Add a command to copy full tag for remote images (#3481) 2022-04-11 09:52:29 -04:00
tsconfig.json Change some TS rules and fix (#3433) 2022-02-22 12:36:21 -05:00
webpack.config.js Upgrades, upgrades, upgrades (#3419) 2022-02-24 11:49:41 -05:00

README.md

Docker for Visual Studio Code Version Installs Build Status

The Docker extension makes it easy to build, manage, and deploy containerized applications from Visual Studio Code. It also provides one-click debugging of Node.js, Python, and .NET Core inside a container.

Docker extension overview

Check out the Working with containers topic on the Visual Studio Code documentation site to get started.

The Docker extension wiki has troubleshooting tips and additional technical information.

Installation

Install Docker on your machine and add it to the system path.

On Linux, you should enable rootless Docker and set the generated Docker context to "rootless" (more secure) or enable Docker CLI for the non-root user account (less secure) that will be used to run VS Code.

To install the extension, open the Extensions view, search for docker to filter results and select Docker extension authored by Microsoft.

Overview of the extension features

Editing Docker files

You can get IntelliSense when editing your Dockerfile and docker-compose.yml files, with completions and syntax help for common commands.

IntelliSense for Dockerfiles

In addition, you can use the Problems panel (Ctrl+Shift+M on Windows/Linux, Shift+Command+M on Mac) to view common errors for Dockerfile and docker-compose.yml files.

Generating Docker files

You can add Docker files to your workspace by opening the Command Palette (F1) and using Docker: Add Docker Files to Workspace command. The command will generate a Dockerfile and .dockerignore file and add them to your workspace. The command will also ask you if you want to add Docker Compose files as well, but this is optional.

The extension can scaffold Docker files for most popular development languages (C#, Node.js, Python, Ruby, Go, and Java) and customizes the generated Docker files accordingly. When these files are created, we also create the necessary artifacts to provide first-class debugging support for Node.js, Python, and .NET (C#).

Docker Explorer

The Docker extension contributes a Docker Explorer view to VS Code. The Docker Explorer lets you examine and manage Docker assets: containers, images, volumes, networks, and container registries. If the Azure Account extension is installed, you can browse your Azure Container Registries as well.

The right-click menu provides access to commonly used commands for each type of asset.

Docker view context menu

You can rearrange the Docker view panes by dragging them up or down with a mouse and use the context menu to hide or show them.

Customize Docker view

Docker commands

Many of the most common Docker commands are built right into the Command Palette:

Docker commands

You can run Docker commands to manage images, networks, volumes, image registries, and Docker Compose. In addition, the Docker: Prune System command will remove stopped containers, dangling images, and unused networks and volumes.

Docker Compose

Docker Compose lets you define and run multi-container applications with Docker. Our Compose Language Service in the Docker extension gives you IntelliSense and tab completions when authoring docker-compose.yml files. Press Ctrl+Space to see a list of valid Compose directives.

Docker Compose IntelliSense

We also provide tooltips when you hover over a Docker Compose YAML attribute.

Docker Compose Tooltips

While Compose Up allows you to run all of your services at once, our new feature Compose Up - Select Services lets you select any combination of the services you want to run.

Docker Compose Up - Select Subset

Once your Compose Up command completes, navigate to the Docker Explorer to view your services as a Compose Group. This allows you to start, stop, and view the logs of each service as a group.

Docker Compose Groups

Using image registries

You can display the content and push, pull, or delete images from Docker Hub and Azure Container Registry:

Azure Container Registry content

An image in an Azure Container Registry can be deployed to Azure App Service directly from VS Code. See Deploy images to Azure App Service to get started. For more information about how to authenticate to and work with registries, see Using container registries.

Debugging services running inside a container

You can debug services built using Node.js, Python, or .NET (C#) that are running inside a container. The extension offers custom tasks that help with launching a service under the debugger and with attaching the debugger to a running service instance. For more information, see Debug containerized apps and Customize the Docker extension.

Azure CLI integration

You can start Azure CLI (command-line interface) in a standalone, Linux-based container with Docker Images: Run Azure CLI command. This gives you access to the full Azure CLI command set in an isolated environment. For more information on available commands, see Get started with Azure CLI.

Contributing

See the contribution guidelines for ideas and guidance on how to improve the extension. Thank you!

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you dont wish to send usage data to Microsoft, you can set the telemetry.telemetryLevel setting to off. Learn more in our FAQ.

License

MIT