Dockerize.NET icon indicating copy to clipboard operation
Dockerize.NET copied to clipboard

Spaces in executable name results in error

Open Nikey646 opened this issue 6 years ago • 1 comments

When you creating a project with a space in the name, it results in the docker run -it {tag} command failing due to this line not escaping the space correctly.

Test case:

$ mkdir "my app"
$ cd "my app"
$ dotnet new console

Adding the Dockerize tool to the .csporj

$ dotnet dockerize -t myapp
$ docker run -it myapp

produces the result of

/bin/sh: 1: /projectBinaries/my: not found

Manually modifying the dockerfile and rebuilding it to have an \ before any spaces results in the docker run command working as expected.

Nikey646 avatar Aug 28 '19 07:08 Nikey646

Hey @Nikey646 I realize this was a while back, but this should be a straightforward fix in the code.

Feel free to make a PR if you are interested.

brthor avatar Jul 30 '20 05:07 brthor