![]() ![]() This will pause the container so that it can listen for vsdbg debugging commands from the IDE. It is being set so that docker-compose can pass it to the Dockerfile's ENTRYPOINT. Note the export REMOTE_DEBUGGING environmental variable. The compose() method is called by the task to stage your container. If you are on windows, a PowerShell project-tasks.ps script is provided in the GitHub source. We will be using the bash project-tasks.sh script for this exercise. The setup scripts project-tasks.sh and project-tasks.ps1 are used to build and compose the container before launching the debugger. The REMOTE_DEBUGGING variable is set via a VSCode pre-launch task. ![]() The docker-compose file contains a single service for creating the docker container. # Kick off a container just to wait debugger to attach and run the appĮNTRYPOINT then sleep infinity else dotnet WebProject.dll fi"] RUN dotnet publish -f netcoreapp2.0 -r debian.8-圆4 -c Debug -o /publish -v quiet & curl -sSL | bash /dev/stdin -v latest -l /vsdbgįROM microsoft/aspnetcore-build:2.0 AS builder ![]() & apt-get install -y -no-install-recommends \ # Development docker image with support for Visual Studio debugging integration If the ENABLE_DEBUGGING environmental variable is set, sleep the application and listen for debug commands. ![]() The ENTRYPOINT for the dockerfile serves dual purposes: Copy the /publish folder contents into the production layer.Create a production layer from the base layer.Publish the web project into /publish folder.Copy the contents of the web project WebProject.Create a build image layer from aspnetcore-build.Create a base image layer from aspnetcore2.0.We are using a multi-stage dockerfile to load a base image containing the Visual Studio Code debugger with the following steps: The following files will be created in this section. In this article, we will learn how to load vsdbg - the Visual Studio Debugger - inside of a docker image and attach to it using VS Code's launchers. When working with multiple microservices, it is important to be able to run a debugger inside the docker container. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |