Open sbang opened 7 months ago
Hi, if this is still an issue: Can you try replacing host.docker.internal in\podman-compose.yml
and \src\appsettings.Podman.json
with the output from running hostname
in windows + a ".local" postfix? E.g.
{
"AuthnGeneralSettings": {
"PlatformEndpoint": "http://localhost:5101/"
},
"LocalPlatformSettings": {
"LocalAppMode": "http",
"LocalFrontendHostname": "MyLocalHostName.local",
"LocalAppUrl": "http://MyLocalHostName.local:5005",
"LocalTestingStorageBasePath": "/AltinnPlatformLocal/",
"LocalTestingStaticTestDataPath": "/testdata/",
"LocalGrafanaUrl": "http://monitoring_grafana:3000"
}
}
I was facing the same problem and think this was the change that resolved the same error as you observed.
FYI; Also found that (in my case) the networking must be set to "user-mode" when creating the podman machine. Full description is in the linked PR.
Description of the bug
I did the following:
Created a test application as outlined in https://docs.altinn.studio/nb/app/app-dev-course/
Cloned app-localtest and followed the podman instructions in README.md
I tried opening http://local.altinn.cloud:8000/ but got an error message
However the application has been started with "dotnet run" as outlined in README.md and is running, listening to port 5005
Tried opening http://host.docker.internal:5005 with curl but got "could not resolve host host.docker.internal":
I tried adding host.docker.internal as an alias for localhost in c:\Windows\System32\Drivers\etc\hosts
This made http://host.docker.internal:5005 work with curl (but got 404 on the root)
But http://local.altinn.cloud:8000/ still got the same error message
Deleted the containers in podman and ran "podman compose --file podman-compose.yml up -d --build" again
After the containers were up, tried http://local.altinn.cloud:8000/ but still got the same error message
Steps To Reproduce
Additional Information
Windows 11 Enterprise, Microsoft .Net SDK 6.0.418, podman desktop 1.7.1, podman 4.9.2