Skip to content

File configuration.json missing in docker build #12

@alexanderfast

Description

@alexanderfast

Repro:

$ git clone https://github.com/TanukiSharp/MinimalNugetServer.git
$ cd MinimalNugetServer/MinimalNugetServer/scripts
$ chmod +x make_publishable.sh
$ ./make_publishable.sh
$ cd ../..
$ docker build -t minimal-nuget-server -f Dockerfile .
$ docker run --rm minimal-nuget-server

Unhandled Exception: System.IO.FileNotFoundException: The configuration file 'configuration.json' was not found and is not optional. The physical path is '/dotnetapp/configuration.json'.
   at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
   at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
   at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
   at MinimalNugetServer.Program.Main(String[] args) in /src/MinimalNugetServer/Program.cs:line 25

But running manually works (after the above):

$ cd MinimalNugetServer
$ dotnet run

So something is definitely up with the docker packaging.

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