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

Sensitivity to new versions of dotnet sdk #20

Open
nbarlowATI opened this issue Mar 26, 2020 · 1 comment
Open

Sensitivity to new versions of dotnet sdk #20

nbarlowATI opened this issue Mar 26, 2020 · 1 comment

Comments

@nbarlowATI
Copy link
Collaborator

Due to permissions issues (binder Docker containers want to be run as a non-root user), we separate out the installation of the dotnet sdk (

RUN apt-get install -y dotnet-sdk-2.1

in Dockerfile_base), and the lines that use dotnet to build the AI assistants server (

RUN dotnet restore wrattler/aiassistants/server/
RUN dotnet build wrattler/aiassistants/server/

in binder/Dockerfile).

However, it seems that the dotnet restore line introduces a dependency on the latest version of the framework, and if this has changed since the base docker image was built, we get an error message when we try to run the AI assistants (using the line

cd ${HOME}/wrattler/aiassistants/server; dotnet bin/Debug/netcoreapp2.1/aiassistants.dll

in binder/start)

The message is:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.17' was not found.
  - Check application dependencies and target a framework version installed at:
      /usr/share/dotnet/
  - Installing .NET Core prerequisites might help resolve this problem:
      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.1.16 at [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]

i.e. 2.1.17 is now the latest version, but the base docker image was built when 2.1.16 was the latest version.

The only way found so far to resolve this is to rebuild the base docker image using --no-cache so that the newer dotnet sdk is installed, bump the tag on the base image and the corresponding "FROM" command in binder/Dockerfile, and push.

Is there some way we can prevent dotnet restore from introducing dependency on the latest version?

@nbarlowATI
Copy link
Collaborator Author

Maybe related:
dotnet/sdk#10286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant