Skip to content

Improve DAP user experience when dockerfile is a relative path #3426

@rcjsuen

Description

@rcjsuen

The following [launch request arguments](https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Launch) are supported. These are sent as a JSON body as part of the launch request.
| Name | Type | Default | Description |
|:--------------------|:--------------|:-------------|:-----------------------------------------------------------------------------|
| `dockerfile` | `string` | `Dockerfile` | Name of the Dockerfile |
| `contextPath` | `string` | `.` | Set the context path for the build (normally the first positional argument) |
| `target` | `string` | | Set the target build stage to build |
| `stopOnEntry` | `boolean` | `false` | Stop on the first instruction |

{
    "request": "launch",
    "contextPath": "/path/to/my/folder",
    "dockerfile": "Dockerfile"
}

The documentation says "Name of the Dockerfile" but it has to be an absolute path.

ERROR: failed to build: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

I think we should return an error to the launch request if a non-absolute path was provided for dockerfile or allow it to go through and then opt to concatenate contextPath with dockerfile if it's non-absolute?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions