Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContainerRepository value with a 'folder' that ends in a ' doesn't give a good error #574

Open
wisamidris7 opened this issue Jun 2, 2024 · 2 comments

Comments

@wisamidris7
Copy link

This is a sample blazor app i didn't even edited a character and that also happen why

dotnet publish "C:\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj" -p:PublishProfile="DefaultContainer" -p:PublishSingleFile="true" -p:PublishTrimmed="false" --self-contained "true" --verbosity "quiet" --nologo -r "linux-x64" -p:ContainerRepository="WASL./identity-api"
-p:ContainerImageTag="latest"

C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018: The
"CreateNewImage" task failed unexpectedly. [C:\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csp
roj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018: Micr
osoft.NET.Build.Containers.DockerLoadException: CONTAINER1009: Failed to load image from local registry. stdout: invali
d reference format [C:\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:  [C:
\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.NET.Build.Containers.DockerCli.LoadAsync(BuiltImage image, SourceImageReference sourceReference, Destinatio
nImageReference destinationReference, CancellationToken cancellationToken) in /_/src/Containers/Microsoft.NET.Build.Con
tainers/LocalDaemons/DockerCli.cs:line 107 [C:\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csp
roj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.NET.Build.Containers.Tasks.CreateNewImage.PushToLocalRegistryAsync(BuiltImage builtImage, SourceImageRefere
nce sourceImageReference, DestinationImageReference destinationImageReference, CancellationToken cancellationToken) in
/_/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs:line 200 [C:\Users\Administrator\source\repos\
BlazorApp29\BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.NET.Build.Containers.Tasks.CreateNewImage.ExecuteAsync(CancellationToken cancellationToken) in /_/src/Conta
iners/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs:line 170 [C:\Users\Administrator\source\repos\BlazorApp29\
BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.NET.Build.Containers.Tasks.CreateNewImage.Execute() in /_/src/Containers/Microsoft.NET.Build.Containers/Tas
ks/CreateNewImage.cs:line 36 [C:\Users\Administrator\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\Administrato
r\source\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj]
C:\Program Files\dotnet\sdk\8.0.300\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error MSB4018:    a
t Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext
taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\Users\Administrator\s
ource\repos\BlazorApp29\BlazorApp29\BlazorApp29.csproj]
@wisamidris7
Copy link
Author

ohh because the . in WASL./

@baronfel
Copy link
Member

baronfel commented Jun 2, 2024

To me the fact that you weren't warned of this invalid name until after we created the image and tried to load it into the local Docker daemon is a bug. There are several pre-check steps that should have validated your ContainerRepository value and either normalized it to a valid value or errored out before doing any work. I'd like to reopen this to track that.

@baronfel baronfel reopened this Jun 2, 2024
@baronfel baronfel changed the title When publishing my application ContainerRepository value with a 'folder' that ends in a ' doesn't give a good error Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants