Skip to content

[Windows][WSL] no such file or directory 'tmp.Dockerfile' #2

@pmvieira93

Description

@pmvieira93

[Windows][WSL] no such file or directory 'tmp.Dockerfile'

Description:

If you are openning a project that are saved inside of your WSL system, you are encontured a problem regarding the file path separator.
In this case, for VS Code the file path separator is '' and you are using a '/' hardcoded. That's the reason for your extension throw an error
after try to create a temporary Dockerfile named 'tmp.Dockerfile'.

You can find that issue under the following file:

  • dockerfile-utils/src/buildContainer.ts (line 20)

Solutions:

[1] Search and Parse from current Path of the Dockerfile for the file path separator
[2] Using system env variables to get file path separator according your operator system
[3] Combination of the two options above to get the better solution

You can find in attachment the screenshot of the error that have been happened

Please, let me know if you need anything else!
Any way, according that you are showing, it's a very nice extension and useful.

Thank you
Pedro Vieira (Software Engineer)

DockerLive-Path-Error-Using-Windows-and-WSL.png

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions