[ADMNAPI-989] Add read me file and fix docker file warnings#96
[ADMNAPI-989] Add read me file and fix docker file warnings#96stephenfuqua merged 6 commits intomainfrom
Conversation
🔍 Vulnerabilities of
|
| digest | sha256:fd28f8fa4a489326d488d9d82d1672268a6f5ea3afce90b6d4861de09ba4a364 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 85 MB |
| packages | 447 |
📦 Base Image alpine:3
| also known as |
|
| digest | sha256:b6ca290b6b4cdcca5b3db3ffa338ee0285c11744b4a6abaa9627746ee3291d8d |
| vulnerabilities |
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description | ||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||
Description
Description
|
stephenfuqua
left a comment
There was a problem hiding this comment.
I was unable to test locally, even running on my home network which usually works for Docker containers. I get an error when the container reaches the dotnet restore command. This is probably just something weird happening on my computer. Would like to see someone else test this.
=> ERROR [adminapi build 6/6] RUN dotnet restore && dotnet build -c Release 2.0s
------
> [adminapi build 6/6] RUN dotnet restore && dotnet build -c Release:
0.888 Determining projects to restore...
1.967 /usr/share/dotnet/sdk/6.0.201/NuGet.targets(130,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [/source/EdFi.Ods.AdminApi/EdFi.Ods.AdminApi.csproj]
1.967 /usr/share/dotnet/sdk/6.0.201/NuGet.targets(130,5): error : Name does not resolve (api.nuget.org:443) [/source/EdFi.Ods.AdminApi/EdFi.Ods.AdminApi.csproj]
1.967 /usr/share/dotnet/sdk/6.0.201/NuGet.targets(130,5): error : Name does not resolve [/source/EdFi.Ods.AdminApi/EdFi.Ods.AdminApi.csproj]
stephenfuqua
left a comment
There was a problem hiding this comment.
Please also update dev.Dockerfile with the same changes that we have in https://github.com/Ed-Fi-Alliance-OSS/AdminAPI-1.x/blob/main/Docker/dev.Dockerfile
@stephenfuqua I had similar issue after updating my docker desktop version. I followed this to adding the dns value temporarily dotnet/core#8048 |
.Net 8 migration changes will be addressed as part of #95 |
Thank you for this link. Another solution mentioned there is to install We were already installing
|
I tried these steps for rearranging the commands to cache the curl. But still getting the "Unable to load the service index for source" error. I noticed that, we dont have any issue running the Admin API 1.x dev.dockerfile, the difference is - upgraded to .net 8. So I tried running the dev.dockerfile from Johnny's PR. It is working fine. Should I still try accomplish the suggested changes ? |
|
I recommend re-arranging the layers anyway, as this is a better structure. Apparently the error message we are both seeing has different solutions. Moving the curl command earlier fixed it for me, without having to modify the Docker engine configuration. |
| FROM mcr.microsoft.com/dotnet/aspnet@sha256:201cedd60cb295b2ebea7184561a45c5c0ee337e37300ea0f25cff5a2c762538 | ||
| LABEL maintainer="Ed-Fi Alliance, LLC and Contributors <techsupport@ed-fi.org>" | ||
| ARG VERSION=latest | ||
| FROM mcr.microsoft.com/dotnet/aspnet@sha256:201cedd60cb295b2ebea7184561a45c5c0ee337e37300ea0f25cff5a2c762538 AS base |
There was a problem hiding this comment.
I really thought that I saw the api.nuget.org connectivity problem being resolved a few days ago when I just moved the curl command. Like you, however, this didn't work for me 😞 .
But... I did find an easy solution: just update the base image to the .NET 8 version! Even though .NET 8 upgrade isn't finished, the SDK for .NET 8 will build a project that targets .NET 6.
Changing to the following solved the problem for me. This is slightly newer than the version we have in Admin API 1 - this version must have been released just a few days ago.
FROM mcr.microsoft.com/dotnet/sdk:8.0.203-alpine3.18@sha256:2a8dca3af111071172b1629c12eefaeca0d6c2954887c4489195771c9e90833c as buildBase
Update the SDK base layer
…ts (#96) Bumps [Microsoft.Data.SqlClient](https://github.com/dotnet/sqlclient) from 5.1.1 to 5.1.3. - [Release notes](https://github.com/dotnet/sqlclient/releases) - [Changelog](https://github.com/dotnet/SqlClient/blob/main/CHANGELOG.md) - [Commits](dotnet/SqlClient@v5.1.1...v5.1.3) --- updated-dependencies: - dependency-name: Microsoft.Data.SqlClient dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
No description provided.