Build fails when using ContainerBaseImage hosted within Quay with Ceph storage backplane
almostjulian opened this issue · 3 comments
I am using a custom base image using the ContainerBaseImage
tag in my csproj. The repository the base image is in is using an internal Quay server, backed by a Ceph storage backend. When I try to run dotnet publish I get (from verbose logs):
Task "CreateNewImage"
Request URI: GET https://<redacted quay url>
2b4ba5280a4ceda629c17922b62441b7
Status code: Found
Response headers:
Accept-Ranges: bytes
Cache-Control: max-age=31536000
Date: Fri, 03 May 2024 21:56:05 GMT
Docker-Content-Digest: sha256:f31c5da86bbd82708860371e4d9f23682b4ba5280a4ceda629c17922b62441b7
Location: http://<redacted ceph backplane url>
Server: nginx/1.20.1
X-Frame-Options: DENY
Response content: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="http://<redaced ceph url>/">http://<redacted ceph url></a>. If not click the link.
1:7>C:\Program Files\dotnet\sdk\8.0.300-preview.24203.14\Containers\build\Microsoft.NET.Build.Containers.targets(219,5): err
or : ContainerHttpException: Containerize: error CONTAINER004: CONTAINER1014: Manifest pull failed. [<redacted project name>]
C:\Program Files\dotnet\sdk\8.0.300-preview.24203.14\Containers\build\Microsoft.NET.Build.Containers.targets(219,5): err
or : URI: https://<redacted quay url> [<redacted project name>]
C:\Program Files\dotnet\sdk\8.0.300-preview.24203.14\Containers\build\Microsoft.NET.Build.Containers.targets(219,5): err
or : [<redacted project name>]
Done executing task "CreateNewImage" -- FAILED.
Is the httpclient being used to fetch this stuff not configured to follow redirects?
cc @baronfel
Is the httpclient being used to fetch this stuff not configured to follow redirects?
I would expect it to, but it's strange we're seeing the the Redirect response being printed in the log.
8.0.300-preview.24203.14
@almostjulian does it behave exactly the same if you use the 8.0.104 SDK?
Can you also try if it makes a difference if you pass your credentials through the envvars (SDK_CONTAINER_REGISTRY_UNAME
and SDK_CONTAINER_REGISTRY_PWORD
)?
@almostjulian does it behave exactly the same if you use the 8.0.104 SDK?
Can you also try if it makes a difference if you pass your credentials through the envvars (
SDK_CONTAINER_REGISTRY_UNAME
andSDK_CONTAINER_REGISTRY_PWORD
)?
Yes, same behavior in 8.0.104. Envvars do not make a difference.
I think the issue is that the Ceph backend is http and I don't think https -> http autoredirect is allowed. I'll see if that's a config change we can make on our end.