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

GenerateDockerfilesCommand fails when there isn't a previously generated Dockerfile #677

Open
MichaelSimons opened this issue Oct 12, 2020 · 1 comment

Comments

@MichaelSimons
Copy link
Member

Example failure:

System.IO.FileNotFoundException: Path specified in manifest file does not exist.
File name: 'src/aspnet/5.0/nanoserver-2004/amd64/Dockerfile'
   at Microsoft.DotNet.ImageBuilder.ViewModel.ModelExtensions.ValidateFileReference(String path, String manifestDirectory) in /image-builder/src/ViewModel/ModelExtensions.cs:line 98
   at Microsoft.DotNet.ImageBuilder.ViewModel.ModelExtensions.ValidateImage(Image image, String manifestDirectory) in /image-builder/src/ViewModel/ModelExtensions.cs:line 132
   at Microsoft.DotNet.ImageBuilder.ViewModel.ModelExtensions.ValidateRepo(Repo repo, String manifestDirectory) in /image-builder/src/ViewModel/ModelExtensions.cs:line 126
   at Microsoft.DotNet.ImageBuilder.ViewModel.ModelExtensions.Validate(Manifest manifest, String manifestDirectory) in /image-builder/src/ViewModel/ModelExtensions.cs:line 63
   at Microsoft.DotNet.ImageBuilder.ViewModel.ManifestInfo.Create(String manifestPath, ManifestFilter manifestFilter, IManifestOptionsInfo options) in /image-builder/src/ViewModel/ManifestInfo.cs:line 64
   at Microsoft.DotNet.ImageBuilder.ViewModel.ManifestInfo.Load(IManifestOptionsInfo options) in /image-builder/src/ViewModel/ManifestInfo.cs:line 45
   at Microsoft.DotNet.ImageBuilder.Commands.ManifestCommand`1.LoadManifest() in /image-builder/src/Commands/ManifestCommand.cs:line 16
   at Microsoft.DotNet.ImageBuilder.ImageBuilder.Main(String[] args) in /image-builder/src/ImageBuilder.cs:line 66

The manifest validation logic is getting in the way for this scenario. This logic runs when the manifest is loaded and validates that every path in the manifest exists. You should be able to use the GenerateDockerfilesCommand to generated the Dockerfiles instead of having to stub them out first.

@mthalman mthalman moved this to Backlog in .NET Docker Dec 1, 2021
@mthalman mthalman moved this from Backlog to Needs Review in .NET Docker Dec 19, 2022
@mthalman mthalman moved this from Needs Review to Current Release in .NET Docker Jun 21, 2023
@mthalman mthalman moved this from Current Release to Post-Release in .NET Docker Aug 16, 2023
@lbussell lbussell moved this from Post-Release to Current Release in .NET Docker Nov 16, 2023
@lbussell
Copy link
Contributor

lbussell commented Aug 5, 2024

[Triage] Related: dotnet/dotnet-docker#4704

@lbussell lbussell moved this from Current Release to Backlog in .NET Docker Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants