Closed jonsamwell closed 8 months ago
It looks like our recent changes to more directly support podman
are causing this: https://github.com/baronfel/sdk-container-demo/actions/runs/5965131944/job/16181869711 you can see here that the images are visible by Podman but not Docker, suggesting they were pushed by Podman. I'm waiting to get some more binlogs, but we should definitely fix this for .NET 8.0.100 RC2. In the meantime, you should be able to set <LocalRegistry>Docker</LocalRegistry>
to explicitly control this in the meantime until we fix this.
A note that I don't see this locally on my Windows machine - I'm guessing because the tooling doesn't detect that podman
is even an option, and so it's defaulting correctly to Docker in that case.
@tmds - I think we might need to tweak this logic a bit. If we want to keep Docker the default, I think it's ok to probe for both commands, but we should only default to podman in the case where it's the only binary on the system IMO.
Present state:
LocalRegistry | Podman present | Docker present | Resolved value |
---|---|---|---|
null | true | true | podman |
null | false | true | docker |
null | true | false | podman |
null | false | false | error |
Proposed future state:
LocalRegistry | Podman present | Docker present | Resolved value |
---|---|---|---|
null | true | true | docker |
null | false | true | docker |
null | true | false | podman |
null | false | false | error |
@tmds - I think we might need to tweak this logic a bit. If we want to keep Docker the default, I think it's ok to probe for both commands, but we should only default to podman in the case where it's the only binary on the system IMO.
The rationale for probing for podman first is that on podman systems sometimes there's a docker alias, and the current logic correctly detects those systems as podman.
I had assumed it would be unlikely a system to have both installed, so it wouldn't be much of an issue that the SDK prefers podman in that case.
github actions on a ubuntu-latest environment
Does the ubuntu-latest environment come with docker and podman?
Yes, it does - the software listings for all the runners are available here. Here's the ubuntu-latest one.
oh ...
@baronfel shall I look into fixing this so it prefers docker over podman?
I'm about to send a PR if you wouldn't mind reviewing/testing?
Closing this as we fixed it in...RC1 I believe.
Hi,
When running dotnet publish locally
V8.0.100-preview.7.23376.3 / MSBuild version 17.8.0-preview-23367-03+0ff2a83e9
the built image is added to the local docker registry. However, when the same command (see below) is run using github actions on aubuntu-latest
environment the image is not published to the local docker instance. The build reports that it was successful and published to the local registry but it is not therePublish command
Logs
docker images --all
result after the publish command reports the image was pushed to the local registry. As you can see it is simply not there.This was all working fine in with dotnet 8.0.100-preview.5.23303.2 and MSBuild version 17.7.0-preview-23281-03+4ce2ff1f8