From aadb69948586d1de37fc068ec101978f78b30677 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Tue, 13 Dec 2022 14:52:03 -0800 Subject: [PATCH 1/7] update overview.md --- docs/containers/images/overview/container-registry.png | 4 ++-- .../images/overview/installation-extension-search.png | 4 ++-- docs/containers/overview.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/containers/images/overview/container-registry.png b/docs/containers/images/overview/container-registry.png index 081fe84cd9..7c5f7b83ea 100644 --- a/docs/containers/images/overview/container-registry.png +++ b/docs/containers/images/overview/container-registry.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77a8a61d208146dd770e06c5d8d6e5213daf8590a77f255de0d19b0351d59647 -size 8888 +oid sha256:37843ac568702d32b743ffd30f52892c918dd692d2af8cb3470b99553ec86102 +size 109473 diff --git a/docs/containers/images/overview/installation-extension-search.png b/docs/containers/images/overview/installation-extension-search.png index 5a4a8e2270..2f0452abf9 100644 --- a/docs/containers/images/overview/installation-extension-search.png +++ b/docs/containers/images/overview/installation-extension-search.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e99dd1f4d20798de59efa1ffb38129f074b1e4135c6ea86f162b91eabbb91d4d -size 8623 +oid sha256:967f1b273997fdbc4e0c5f2481284f571159b84b1e2e975e9c1243f6af68e451 +size 107614 diff --git a/docs/containers/overview.md b/docs/containers/overview.md index 4a107560ce..d0e5d91f6b 100644 --- a/docs/containers/overview.md +++ b/docs/containers/overview.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Overview ContentId: 4B462667-8915-4BE0-B8D0-EDE51CB2D273 PageTitle: Docker extension for Visual Studio Code -DateApproved: 11/3/2021 +DateApproved: 12/13/2022 MetaDescription: Tools for developing and debugging with Docker containers, using Visual Studio Code. --- # Docker in Visual Studio Code From 45ead0a460f093ef10f25c42959fd0651c076ba2 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Tue, 13 Dec 2022 17:11:03 -0800 Subject: [PATCH 2/7] quickstart refresh --- .../overview/dockerfile-intellisense.png | 4 ++-- .../quickstarts/aspnetcore-add-dotnet.png | 4 ++-- .../aspnetcore-debug-configuration.png | 4 ++-- .../aspnetcore-intellisense-env.png | 4 ++-- .../aspnetcore-running-container.png | 4 ++-- .../quickstarts/aspnetcore-verify-image.png | 4 ++-- docs/containers/overview.md | 4 ++-- docs/containers/quickstart-aspnet-core.md | 18 ++++++++---------- docs/containers/quickstart-node.md | 8 ++++---- docs/containers/quickstart-python.md | 2 +- 10 files changed, 27 insertions(+), 29 deletions(-) diff --git a/docs/containers/images/overview/dockerfile-intellisense.png b/docs/containers/images/overview/dockerfile-intellisense.png index b29f95abe7..16ccccab0c 100644 --- a/docs/containers/images/overview/dockerfile-intellisense.png +++ b/docs/containers/images/overview/dockerfile-intellisense.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c90f28b6ad9921ba3e646da5a7f84f3b17ee404a4dbffad30354e6e081c0b9f8 -size 21102 +oid sha256:307fc27f1784f5cb8fe121aa3aa9190f5ca8122d6f83f5b0f2394a53ba0ea1cc +size 174170 diff --git a/docs/containers/images/quickstarts/aspnetcore-add-dotnet.png b/docs/containers/images/quickstarts/aspnetcore-add-dotnet.png index 53410fb1de..29dae3c76d 100644 --- a/docs/containers/images/quickstarts/aspnetcore-add-dotnet.png +++ b/docs/containers/images/quickstarts/aspnetcore-add-dotnet.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7956308c266dd6beab6a38b7694036d0501dffafcb49dcdd2f313e43d2efaedd -size 11704 +oid sha256:abd4c12424d53bcdfaab3f8df8d4db44bf4288e608d6022aebc44ae1538b2a19 +size 98117 diff --git a/docs/containers/images/quickstarts/aspnetcore-debug-configuration.png b/docs/containers/images/quickstarts/aspnetcore-debug-configuration.png index 76b8d34c37..f0b94960b5 100644 --- a/docs/containers/images/quickstarts/aspnetcore-debug-configuration.png +++ b/docs/containers/images/quickstarts/aspnetcore-debug-configuration.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dade2328d46fe29adbbe5c31c534f065fe69b1abee1aae205b1ed35992658e9c -size 17381 +oid sha256:c6e35f7ec485e4fa8ec30193afd8d1b3434859b6632fe48f42fd23ab4fa64f2e +size 246088 diff --git a/docs/containers/images/quickstarts/aspnetcore-intellisense-env.png b/docs/containers/images/quickstarts/aspnetcore-intellisense-env.png index f2fc463772..9ba05c9c86 100644 --- a/docs/containers/images/quickstarts/aspnetcore-intellisense-env.png +++ b/docs/containers/images/quickstarts/aspnetcore-intellisense-env.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0fe9dcca46e80aaa5960e8ceec6b2a24ec3a9155f656d74e56b8341dbafd1dc6 -size 24072 +oid sha256:8b83cef6fd19ef3ffebb2a8852f8b9413bf2c2c3f987ab1d51613e901a163eb6 +size 124812 diff --git a/docs/containers/images/quickstarts/aspnetcore-running-container.png b/docs/containers/images/quickstarts/aspnetcore-running-container.png index 0e9a82e90d..05753d9654 100644 --- a/docs/containers/images/quickstarts/aspnetcore-running-container.png +++ b/docs/containers/images/quickstarts/aspnetcore-running-container.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaf6ec84d1f07e8b687cc05e672cd4134e1ab15162c1504731af28c2e0807308 -size 2181 +oid sha256:024d446970a2195c782d93f0f04a5e6d2168636b6469de9a050fcf319d1f2bd6 +size 22716 diff --git a/docs/containers/images/quickstarts/aspnetcore-verify-image.png b/docs/containers/images/quickstarts/aspnetcore-verify-image.png index d7dfbcf880..a812274742 100644 --- a/docs/containers/images/quickstarts/aspnetcore-verify-image.png +++ b/docs/containers/images/quickstarts/aspnetcore-verify-image.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f5a5b535c4c62a6082d0d3f261365c7754287369d4562a5a2fbdaf7a01ae90c1 -size 4825 +oid sha256:6687632a21c0c1bb0452cfcff6c38f7d4b0afa0b2b5bd701dd431e6f50ab3f79 +size 34950 diff --git a/docs/containers/overview.md b/docs/containers/overview.md index d0e5d91f6b..c2b66f601f 100644 --- a/docs/containers/overview.md +++ b/docs/containers/overview.md @@ -25,7 +25,7 @@ To install the extension, open the Extensions view (`kb(workbench.view.extension ## Editing Docker files -You can get [IntelliSense](/docs/editor/intellisense.md) when editing your `Dockerfile` and `docker-compose.yml` files, with completions and syntax help for common commands. +You can get [IntelliSense](/docs/editor/intellisense.md) by clicking `kb(editor.action.triggerSuggest)` when editing your `Dockerfile` and `docker-compose.yml` files, with completions and syntax help for common commands. ![IntelliSense for Dockerfiles](images/overview/dockerfile-intellisense.png) @@ -81,7 +81,7 @@ You can display the content and push, pull, or delete images from [Azure Contain ![Azure Container Registry content](images/overview/container-registry.png) -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](/docs/containers/app-service.md) to get started. For more information about how to authenticate to and work with registries, see [Using container registries](/docs/containers/quickstart-container-registries.md). +An image in an Azure Container Registry can be deployed to Azure App Service directly from VS Code. See [Deploy to Azure App Service](/docs/containers/app-service.md) to get started. For more information about how to authenticate to and work with registries, see [Using container registries](/docs/containers/quickstart-container-registries.md). ## Debugging services running inside a container diff --git a/docs/containers/quickstart-aspnet-core.md b/docs/containers/quickstart-aspnet-core.md index bff98bee3d..d52fe49aaa 100644 --- a/docs/containers/quickstart-aspnet-core.md +++ b/docs/containers/quickstart-aspnet-core.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: ASP.NET Core ContentId: 29F731D4-C6FE-4742-A1E7-7288FDB81CB9 PageTitle: Build and run an ASP.NET Core app in a container -DateApproved: 10/28/2020 +DateApproved: 12/13/2022 MetaDescription: Develop, build, and debug an ASP.NET Core app in a Docker container, using Visual Studio Code. --- # ASP.NET Core in a container @@ -53,24 +53,22 @@ In this guide you will learn how to: 1. Issue `dotnet build` command to build the application: ``` - ~/code/scratch/netcorerest$ dotnet build - Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET - Copyright (C) Microsoft Corporation. All rights reserved. - + PS C:\source\repos\net> dotnet build + MSBuild version 17.4.0-preview-22470-08+6521b1591 for .NET Determining projects to restore... All projects are up-to-date for restore. - nettest -> c:\source\repos\nettest\bin\Debug\net6.0\nettest.dll - + net -> C:\source\repos\net\bin\Debug\net7.0\net.dll + Build succeeded. 0 Warning(s) 0 Error(s) - - Time Elapsed 00:00:03.78 + + Time Elapsed 00:00:08.96 ``` ## Add an environment variable to the image -You can use the Docker extension to author Docker files. The extension provides completions and contextual help. To see these capabilities add an environment variable to your service image by following these: +You can use the Docker extension to author Docker files. The extension provides completions and contextual help. To see these capabilities add an environment variable to your service image by following these steps: 1. Open the `Dockerfile` file. 1. Use `ENV` instruction to add an environment variable to the service container image. The instruction should be placed in the `base` stage of the `Dockerfile` (the first stage in the file). Set the `ASPNETCORE_URLS` variable to `http://*:5000`: diff --git a/docs/containers/quickstart-node.md b/docs/containers/quickstart-node.md index ae3e1cb377..9e68f6864f 100644 --- a/docs/containers/quickstart-node.md +++ b/docs/containers/quickstart-node.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Node.js ContentId: A963901F-BF3F-455F-AD75-AB54EAE72BEF PageTitle: Build and run a Node.js app in a container -DateApproved: 10/28/2020 +DateApproved: 12/13/2022 MetaDescription: Develop, build, and debug a Node.js app in a Docker container, using Visual Studio Code. --- # Node.js in a container @@ -38,9 +38,9 @@ In this guide you will learn how to: ![Add Dockerfile to a Node.js project](images/quickstarts/node-add-node-dark.png) 1. Select **Node.js** when prompted for the application platform. -1. Select either **Yes** or **No** when prompted to include Docker Compose files. Compose is typically used when running multiple containers at once. - +1. Choose the default **package.json** file. 1. Enter `3000` when prompted for the application port. +1. Select either **Yes** or **No** when prompted to include Docker Compose files. Compose is typically used when running multiple containers at once. The extension creates `Dockerfile` and `.dockerignore` files. If you elected to include Docker Compose files, `docker-compose.yml` and `docker-compose.debug.yml` will be generated as well. Finally, the extension will create a set of **VS Code tasks** in `.vscode/tasks.json` for building and running the container (in both debug- and release-configurations) and a **launch debug configuration** in `.vscode/launch.json` for debugging the service within the container. @@ -109,7 +109,7 @@ When the Docker extension adds files to the application, it also adds a **VS Cod - The browser opens to the (random) port mapped to the service container. - The debugger stops at the breakpoint in `index.js`. - > Note that, because the debugger attaches *after* the application starts, the breakpoint may missed the first time around; you might have to refresh the browser to see the debugger break on the second try. + > Note that, because the debugger attaches *after* the application starts, the breakpoint may be missed the first time around; you might have to refresh the browser to see the debugger break on the second try. > > You can configure the application to wait for the debugger to attach before starting execution by setting the [inspectMode](/docs/containers/reference.md#node-object-properties-dockerrun-task) property to `break` in the `docker-run: debug` task in `tasks.json` under the `node` object. diff --git a/docs/containers/quickstart-python.md b/docs/containers/quickstart-python.md index 097866341e..a9a127b3e5 100644 --- a/docs/containers/quickstart-python.md +++ b/docs/containers/quickstart-python.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Python ContentId: 3a9bc520-95e2-416e-a0ac-5be02a38c4c3 PageTitle: Build and run a Python app in a container -DateApproved: 1/12/2022 +DateApproved: 10/30/2022 MetaDescription: Develop, build, and debug a Python app in a Docker container, using Visual Studio Code. --- # Python in a container From b20acf6c046bc2a996bca3a52a46f9a74e4935c5 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Wed, 21 Dec 2022 14:38:47 -0800 Subject: [PATCH 3/7] refresh articles --- docs/containers/debug-common.md | 12 +++++------- docs/containers/debug-netcore.md | 2 +- docs/containers/debug-node.md | 11 ++++++----- docs/containers/debug-python.md | 9 ++++----- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/docs/containers/debug-common.md b/docs/containers/debug-common.md index 404494befe..d3d3488054 100644 --- a/docs/containers/debug-common.md +++ b/docs/containers/debug-common.md @@ -4,12 +4,12 @@ Area: containers TOCTitle: Debug ContentId: A1371726-5310-4923-B43B-240F36C6264E PageTitle: Debug an app running in a Docker container -DateApproved: 7/16/2021 +DateApproved: 12/21/2022 MetaDescription: Debug an app running in a Docker container, using Visual Studio Code. --- # Debug containerized apps -With version 0.9.0 and later, the Docker extension provides more support for debugging applications within Docker containers, such as scaffolding `launch.json` configurations for attaching a debugger to applications running within a container. +The Docker extension provides more support for debugging applications within Docker containers, such as scaffolding `launch.json` configurations for attaching a debugger to applications running within a container. The Docker extension provides a `docker` debug configuration provider that manages how VS Code will launch an application and/or attach a debugger to the application in a running Docker container. This provider is configured via entries within `launch.json`, with configuration being specific to each application platform supported by the provider. @@ -33,13 +33,13 @@ Example `launch.json` configuration for debugging a Node.js application: ```json { - "version": "0.2.0", "configurations": [ + { - "name": "Launch Node.js in Docker", + "name": "Docker Node.js Launch", "type": "docker", "request": "launch", - "preLaunchTask": "Run Docker Container", + "preLaunchTask": "docker-run: debug", "platform": "node" } ] @@ -78,8 +78,6 @@ Example `launch.json` configuration for debugging a Python application: More information about debugging .NET applications within Docker containers can be found in [Debug .NET within Docker containers](/docs/containers/debug-netcore.md). -> The previous (Preview) .NET Docker debugging support (utilizing `"type": "docker-coreclr"` instead of the current preview's `"type": "docker"`) is being deprecated. You can still find documentation on that support at [Debug .NET Core - Deprecated](https://github.com/microsoft/vscode-docker/wiki/Debug-NetCore-Deprecated). - Example `launch.json` configuration for debugging a .NET application: ```json diff --git a/docs/containers/debug-netcore.md b/docs/containers/debug-netcore.md index 8aa994ab23..521e971fc0 100644 --- a/docs/containers/debug-netcore.md +++ b/docs/containers/debug-netcore.md @@ -2,7 +2,7 @@ Area: containers ContentId: B1DF33C0-400C-413D-B60B-D1AA278F6DE3 PageTitle: Debug a .NET app running in a Docker container -DateApproved: 4/15/2021 +DateApproved: 12/21/2022 MetaDescription: Debug a .NET app running in a Docker container, using Visual Studio Code. --- # Debug .NET within a container diff --git a/docs/containers/debug-node.md b/docs/containers/debug-node.md index a71df91998..d37c64e7cb 100644 --- a/docs/containers/debug-node.md +++ b/docs/containers/debug-node.md @@ -2,7 +2,7 @@ Area: containers ContentId: F0C800DD-C477-492D-9545-745F570FE042 PageTitle: Configure and troubleshoot debugging of Node.js apps running in a Docker container -DateApproved: 9/23/2020 +DateApproved: 12/21/2022 MetaDescription: How to configure and troubleshoot debugging of Node.js apps running in a Docker container, using Visual Studio Code. --- @@ -117,8 +117,7 @@ Also note that the `debug` logger writes logs only when enabled via the `DEBUG` ### Configuring when the application is "ready" -The extension determines the application is "ready" to receive HTTP connections when it writes a message of the form `Listening on port ` to the debug console, as Express.js does by default. If the application logs a different -message, then you should set the `pattern` property of the [dockerServerReadyAction](/docs/containers/debug-common.md#dockerserverreadyaction-object-properties) object of the debug launch configuration to a [JavaScript regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) that matches that message. The regular expression should include a capture group that corresponds to the port on which the application is listening. +The extension determines the application is "ready" to receive HTTP connections when it writes a message of the form `Listening on port ` to the debug console, as Express.js does by default. If the application logs a different message, then you should set the `pattern` property of the [dockerServerReadyAction](/docs/containers/debug-common.md#dockerserverreadyaction-object-properties) object of the debug launch configuration to a [JavaScript regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) that matches that message. The regular expression should include a capture group that corresponds to the port on which the application is listening. For example, suppose the application logs the following message: @@ -210,7 +209,7 @@ Dockerfiles are often arranged in such a way as to optimize either image build t The solution is to remove that optimization from the `Dockerfile`: ```docker -FROM node:10.13-alpine +FROM node:lts-alpine ENV NODE_ENV=production WORKDIR /usr/src/app COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] @@ -219,5 +218,7 @@ COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] RUN npm install --production --silent COPY . . EXPOSE 3000 -CMD npm start +RUN chown -R node /usr/src/app +USER node +CMD ["npm", "start"] ``` diff --git a/docs/containers/debug-python.md b/docs/containers/debug-python.md index e6208e6be0..b3b3a92767 100644 --- a/docs/containers/debug-python.md +++ b/docs/containers/debug-python.md @@ -2,7 +2,7 @@ Area: containers ContentId: f9ffec31-9253-4f71-a4eb-79ea7b3a8f55 PageTitle: Configure and troubleshoot debugging of Python apps running in a Docker container -DateApproved: 7/26/2021 +DateApproved: 12/21/2021 MetaDescription: How to configure and troubleshoot debugging of Python apps running in a Docker container, using Visual Studio Code. --- @@ -104,7 +104,6 @@ Here is an example of using `dockerServerReadyAction` to launch the browser to o - `action`: The action to take when the pattern is found. Can be `debugWithChrome` or `openExternally`. - `pattern`: If the application logs a different message than shown above, set the `pattern` property of the [dockerServerReadyAction](/docs/containers/debug-common.md#dockerserverreadyaction-object-properties) object to a [JavaScript regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions) that matches that message. The regular expression should include a capture group that corresponds to the port on which the application is listening. - - `uriFormat`: By default, the Docker extension will open the main page of the browser (however that is determined by the application). If you want the browser to open a specific page like the example above, the `uriFormat` property of the [dockerServerReadyAction](/docs/containers/debug-common.md#dockerserverreadyaction-object-properties) object should be set to a format string with two string tokens to indicate the protocol and port substitution. ## How to enable hot reloading in Django or Flask apps @@ -119,7 +118,7 @@ When you select **Docker: Add Docker Files to Workspace** for Django or Flask, w #ADD . /app ``` -1. Within the `docker-run` task in the `tasks.json` file, create a new dockerRun attribute with a `volumes` property. This will create a mapping from the current workspace folder (app code) to the `/app` folder in the container. +1. Within the `docker-run` task in the `tasks.json` file, create a new `dockerRun` attribute with a `volumes` property. This setting creates a mapping from the current workspace folder (app code) to the `/app` folder in the container. ``` json { @@ -173,7 +172,7 @@ When you select **Docker: Add Docker Files to Workspace** for Django or Flask, w #ADD . /app ``` -1. Within the `docker-run` task in the `tasks.json` file, edit the existing dockerRun attribute by adding a `FLASK_ENV` in the `env` property as well as a `volumes` property. This will create a mapping from the current workspace folder (app code) to the `/app` folder in the container. +1. Within the `docker-run` task in the `tasks.json` file, edit the existing dockerRun attribute by adding a `FLASK_ENV` in the `env` property as well as a `volumes` property. This setting creates a mapping from the current workspace folder (app code) to the `/app` folder in the container. ``` json { @@ -250,7 +249,7 @@ When you select **Docker: Add Docker Files to Workspace** for Django or Flask, w ] ``` -**Tip:** As the dependency clearly states `docker-build` as its dependency, the name has to match this task. It can be changed to anything though. +**Tip:** As the dependency clearly states `docker-build` as its dependency, the name has to match this task. You can change the name, if desired. 1. The `dockerBuild` object in the JSON allows for the following parameters: From 26725fd534892aa0628d14afee3e40dfdefca8d4 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Wed, 21 Dec 2022 14:52:46 -0800 Subject: [PATCH 4/7] refresh docker compose --- docs/containers/docker-compose.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/containers/docker-compose.md b/docs/containers/docker-compose.md index c5b5ca5ac6..312b2cc3bb 100644 --- a/docs/containers/docker-compose.md +++ b/docs/containers/docker-compose.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Docker Compose ContentId: c63d86a0-48f8-4724-ba24-fa5ce4199632 PageTitle: Use Docker Compose to work with multiple containers -DateApproved: 7/16/2021 +DateApproved: 12/21/2022 MetaDescription: Develop a multi-container app running in a Docker containers using Docker Compose and Visual Studio Code. --- # Use Docker Compose @@ -33,7 +33,7 @@ With the docker-compose files, you can now specify port mappings in the docker-c ## Add new containers to your projects -If you want to add another app or service, you can run **Add Docker Compose Files to Workspace** again, and choose to overwrite the existing docker-compose files, but you'll lose any customization in those files. If you want to preserve changes to the compose files, you can manually modify the `docker-compose.yml` file to add the new service. Typically, you can cut and paste the existing service section and change the names as appropriate for the new service. +If you want to add another app or service, you can run **Add Docker Compose Files to Workspace** again, and choose to overwrite the existing docker-compose files, but you'll lose any customization in those files. If you want to preserve changes to the compose files, you can manually modify the `docker-compose.yml` file to add the new service. Typically, you can copy the existing service section, paste it to create a new entry, and change the names as appropriate for the new service. You can run the **Add Docker Files to Workspace** command again to generate the `Dockerfile` for a new app. While each app or service has its own Dockerfile, there's typically one `docker-compose.yml` and one `docker-compose.debug.yml` file per workspace. @@ -76,7 +76,7 @@ Create an **Attach** [launch configuration](/docs/editor/debugging.md#launch-con command: node --inspect=0.0.0.0:9229 ./bin/www ``` -1. If you have multiple apps, you need to change the port for one of them, so that each app has a unique port. You can point to the right debugging port in the `launch.json`, and save the file. If you omit this, the port will be chosen automatically. +1. If you have multiple apps, you need to change the port for some of them, so that each app has a unique port. You can point to the right debugging port in the `launch.json`, and save the file. If you omit this, the port will be chosen automatically. Here's an example that shows the Node.js launch configuration - Attach: @@ -111,7 +111,7 @@ For debugging Python with Docker Compose, follow these steps: ![Screenshot of Python Remote Attach](images/compose/docker-compose-python-remote-attach.png) -1. You'll be prompted to choose the host machine (for example, localhost) and port you want to use for debugging. The default debugging port for Python is 5678. If you have multiple apps, you need to change the port for one of them, so that each app has a unique port. You can point to the right debugging port in the `launch.json`, and save the file. If you omit this, the port will be chosen automatically. +1. You're prompted to choose the host machine (for example, localhost) and port you want to use for debugging. The default debugging port for Python is 5678. If you have multiple apps, you need to change the port for one of them, so that each app has a unique port. You can point to the right debugging port in the `launch.json`, and save the file. If you omit this, the port will be chosen automatically. ```json "configurations": [ @@ -167,7 +167,7 @@ For debugging Python with Docker Compose, follow these steps: ### .NET -1. On the **Debug** tab, choose the **Configuration** dropdown, choose **New Configuration** and select the `Docker Attach` configuration template **.NET Core Docker Attach (Preview)**. +1. On the **Debug** tab, choose the **Configuration** dropdown, choose **New Configuration** and select the `Docker Attach` configuration template **.NET Core Docker Attach**. 1. VS Code tries to copy `vsdbg` from the host machine to the target container using a default path. You can also provide a path to an existing instance of `vsdbg` in the **Attach** configuration. @@ -226,7 +226,7 @@ Workspaces can have multiple docker-compose files to handle different environmen ### Base file and an override file -Let's assume your workspace has a base compose file (`docker-compose.yml`) and an override file for each environment (`docker-compose.dev.yml`, `docker-compose.test.yml` and `docker-compose.prod.yml`) and you always compose up with the base file and an override file. In this case, the `compose up` command can be customized as in the following example. When the `compose up` command is invoked, the `${configurationFile}` is replaced by the selected file. +Let's assume your workspace has a base compose file (`docker-compose.yml`) and an override file for each environment (`docker-compose.dev.yml`, `docker-compose.test.yml` and `docker-compose.prod.yml`) and you always run `docker compose up` with the base file and an override file. In this case, the `compose up` command can be customized as in the following example. When the `compose up` command is invoked, the `${configurationFile}` is replaced by the selected file. ```json "docker.commands.composeUp": [ @@ -239,7 +239,7 @@ Let's assume your workspace has a base compose file (`docker-compose.yml`) and a ### Template matching -Let's assume you have different set of input files for each environment. You could define multiple templates with regular expression match, and the selected file name will be matched against this `match` property and the corresponding template will be used. +Let's assume you have a different set of input files for each environment. You could define multiple templates with regular expression match, and the selected file name will be matched against this `match` property and the corresponding template will be used. ```json "docker.commands.composeUp": [ @@ -263,7 +263,7 @@ Let's assume you have different set of input files for each environment. You co ### Pick a template when the command is invoked -If you omit the `match` property from command templates, you will be asked which template to use each time `compose up` command is invoked. For example: +If you omit the `match` property from command templates, you're asked which template to use each time `compose up` command is invoked. For example: ```json "docker.commands.composeUp": [ @@ -284,7 +284,7 @@ If you omit the `match` property from command templates, you will be asked which ## Custom tasks -Rather than use command customization, you can also define a task like the following to invoke a `docker-compose` command. Please refer [custom task](/docs/editor/tasks.md#custom-tasks) for more detail on this. +Rather than use command customization, you can also define a task like the following to invoke a `docker-compose` command. Please refer [custom task](/docs/editor/tasks.md#custom-tasks) for more detail on this option. ```json { From 96119365b83291c9c6953933cbafb1be8d67f301 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Wed, 21 Dec 2022 15:18:19 -0800 Subject: [PATCH 5/7] refresh pass --- .../registries/azure-image-context-menu.png | 4 +-- .../quickstart-container-registries.md | 34 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/containers/images/registries/azure-image-context-menu.png b/docs/containers/images/registries/azure-image-context-menu.png index 6482dc4f13..7a72ee9aa1 100644 --- a/docs/containers/images/registries/azure-image-context-menu.png +++ b/docs/containers/images/registries/azure-image-context-menu.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54301729b6ee5d3e2ac6735d77b4dcdfbc1c6caa3f8ceda168e454befe54cdf5 -size 1560 +oid sha256:53e5ec64486b4b0c552ec91ae71b82c1ab0d9c6bf1f818e33df0b9303098c3ab +size 25047 diff --git a/docs/containers/quickstart-container-registries.md b/docs/containers/quickstart-container-registries.md index 22c4df36a0..c5935395d0 100644 --- a/docs/containers/quickstart-container-registries.md +++ b/docs/containers/quickstart-container-registries.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Registries ContentId: 318A4299-AF24-4ADA-863D-E73B314FC440 PageTitle: Quickstart - Using container registries -DateApproved: 3/23/2022 +DateApproved: 12/21/2022 MetaDescription: Work with Docker container registries in Visual Studio Code --- # Using container registries @@ -20,9 +20,9 @@ Users can connect to Docker registries from the following sources: ## Push an image to a container registry -Before you can deploy a Docker image, the image must be uploaded to a container registry. The image can be uploaded to [Docker Hub](https://hub.docker.com/), [Azure Container Registry (ACR)](https://learn.microsoft.com/azure/container-registry/container-registry-get-started-portal) or another registry. You can follow the same steps to push the image regardless of whether you're pushing to DockerHub, Azure Container Registries, or any other registry. If you don't already have an Azure Container Registry, you can create one during the **Push** step. +Before you can deploy a Docker image, the image must be uploaded to a container registry. The image can be uploaded to [Docker Hub](https://hub.docker.com/), [Azure Container Registry (ACR)](https://learn.microsoft.com/azure/container-registry/container-registry-get-started-portal) or another registry. You can follow the same steps to push the image regardless of whether you're pushing to Docker Hub, Azure Container Registries, or any other registry. If you don't already have an Azure Container Registry, you can create one during the **Push** step. -1. Open the Docker Explorer and select **Connect Registry...** icon under **Registries** group and follow the prompt. Choose the provider (for example, Azure or Docker Hub) and provide the credential to connect to the registry. If prompted, install the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension. +1. Open the Docker Explorer, select **Connect Registry...** icon under the **Registries** group, and follow the prompt. Choose the provider (for example, Azure or Docker Hub) and provide the credential to connect to the registry. If prompted, install the [Azure Account](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azure-account) extension. ![Connect to Registry](images/registries/connect-registry-2.png) @@ -74,44 +74,44 @@ For each registry, users have different actions that can be performed using the ![Azure registry context menu](images/registries/azure-registry-context-menu.png) -- **Delete registry**: deletes the registry permanently -- **Open in portal**: opens the browser and navigates to the registry in Azure Portal -- **View properties**: opens the registry properties in a json format +- **Delete Registry**: deletes the registry permanently +- **Open in Portal**: opens the browser and navigates to the registry in Azure Portal +- **View Properties**: opens the registry properties in a json format - **Refresh**: refreshes the registry to reflect changes For each repository in a given registry, here are the actions that can be performed: ![Azure repository context menu](images/registries/azure-repository-context-menu.png) -- **Pull repository**: copies all of the images in a given repository locally -- **Delete repository**: deletes the repository permanently +- **Pull Repository**: copies all of the images in a given repository locally +- **Delete Repository**: deletes the repository permanently - **Refresh**: refreshes the repository to reflect changes For each tagged image in a repository, here are the actions that can be performed: ![Azure image context menu](images/registries/azure-image-context-menu.png) -- **Pull image**: copies the latest version of the image locally -- **Copy image digest**: copies the image digest, which is a SHA256 hash identifier that Docker uses, to the clipboard. See [Docker Docs](https://docs.docker.com/engine/reference/commandline/images/#list-image-digests) for more info on image digests -- **Deploy image to Azure App Service**: deploys the image to Azure App Service, see [Deploy images to Azure App Service](/docs/containers/app-service.md) page -- **Untag image**: untags the image -- **Delete image**: deletes the image permanently +- **Pull Image**: copies the latest version of the image locally +- **Copy Full Tag**: copies the full tag to the clipboard +- **Copy Image Digest**: copies the image digest, which is a SHA256 hash identifier that Docker uses, to the clipboard. See [Docker Docs](https://docs.docker.com/engine/reference/commandline/images/#list-image-digests) for more info on image digests +- **Deploy Image to Azure App Service**: deploys the image to Azure App Service, see [Deploy images to Azure App Service](/docs/containers/app-service.md) page +- **Untag Image**: untags the image +- **Delete Image**: deletes the image permanently ## GitLab -This connects to Docker registries in your [GitLab](https://gitlab.com/) account. -Once you select this option, you will be required to type in your GitLab account credentials. +This connects to Docker registries in your [GitLab](https://gitlab.com/) account. Once you select this option, you are asked to type in your GitLab account credentials. ![GitLab](images/registries/gitlab.png) For each repository in the GitLab registry, here are the actions that can be performed: -- **Pull repository**: copies all of the images in a given repository locally +- **Pull Repository**: copies all of the images in a given repository locally - **Refresh**: refreshes the repository to reflect changes For each tagged image in a repository, here are the actions that can be performed: -- **Pull image**: copies the latest version of the image locally +- **Pull Image**: copies the latest version of the image locally ## Next steps From b27a44ae499994e0f2231f03eb8128d0f9f21358 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Wed, 21 Dec 2022 15:20:34 -0800 Subject: [PATCH 6/7] refresh dates --- docs/containers/bridge-to-kubernetes.md | 2 +- docs/containers/troubleshooting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/containers/bridge-to-kubernetes.md b/docs/containers/bridge-to-kubernetes.md index 8de17f4044..1283a0e1a6 100644 --- a/docs/containers/bridge-to-kubernetes.md +++ b/docs/containers/bridge-to-kubernetes.md @@ -4,7 +4,7 @@ Area: containers TOCTitle: Develop with Kubernetes ContentId: 80bd336b-0d2d-4d63-a771-8b3ea22a64d3 PageTitle: Use Bridge to Kubernetes to run and debug locally with Kubernetes -DateApproved: 12/7/2022 +DateApproved: 12/21/2022 MetaDescription: Learn how to use Bridge to Kubernetes. --- diff --git a/docs/containers/troubleshooting.md b/docs/containers/troubleshooting.md index dab40e430d..1f7bef4e1b 100644 --- a/docs/containers/troubleshooting.md +++ b/docs/containers/troubleshooting.md @@ -5,7 +5,7 @@ TOCTitle: Tips and Tricks PageTitle: Visual Studio Code Docker development troubleshooting Tips and Tricks ContentId: 79bb60fd-5248-43d2-8801-34b9fc2ec543 MetaDescription: Visual Studio Code Docker development troubleshooting tips and tricks -DateApproved: 12/16/2021 +DateApproved: 12/21/2022 --- # Docker Tools Tips and Tricks From 160219fa5bdeec39d1d7f54edabd110b0c902446 Mon Sep 17 00:00:00 2001 From: Gordon Hogenson Date: Tue, 10 Jan 2023 09:22:49 -0800 Subject: [PATCH 7/7] Update docs/containers/docker-compose.md --- docs/containers/docker-compose.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/containers/docker-compose.md b/docs/containers/docker-compose.md index 312b2cc3bb..0512214873 100644 --- a/docs/containers/docker-compose.md +++ b/docs/containers/docker-compose.md @@ -167,7 +167,7 @@ For debugging Python with Docker Compose, follow these steps: ### .NET -1. On the **Debug** tab, choose the **Configuration** dropdown, choose **New Configuration** and select the `Docker Attach` configuration template **.NET Core Docker Attach**. +1. On the **Debug** tab, choose the **Configuration** dropdown, choose **New Configuration** and select the `Docker Attach` configuration template **.NET Core Docker Attach (Preview)**. 1. VS Code tries to copy `vsdbg` from the host machine to the target container using a default path. You can also provide a path to an existing instance of `vsdbg` in the **Attach** configuration.