Skip to content

Change to a tasks-based model for Docker Build / Docker Run #1242

@bwateratmsft

Description

@bwateratmsft

Historically the process of building and starting a debug container was done entirely during resolveDebugConfiguration, which at the time was the only way possible, but is a bit of an abuse of the API.

Now that resolveTask is supported in VSCode, it is possible for us to resolve docker build / docker run tasks just-in-time. This means we can use preLaunchTask + tasks to start the container for debugging.

In addition this gives us an opportunity to add debuggable languages/platforms more easily. Our top three appear to be Node.js, .NET Core, and Python.

This PR also enhances the previously-existing build command to use an available docker-build task from tasks.json, otherwise it falls back to the prior behavior.

This PR also adds a pull option to docker build options, equivalent to the --pull flag, to help mitigate issues caused by stale images.

Related items:
#764
#879
#38
#1094
#1211
#1202

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions