loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.76k stars 328 forks source link

Using podman <4.9 with devcontainer features does not work #984

Closed aacebedo closed 5 months ago

aacebedo commented 6 months ago

What happened?

I tried to use devpod with podman on ubuntu 22.04. I have devcontainer.json with some features that fail to build with the following error:

19:06:47 info Build with internal buildkit...
19:06:47 info unable to upgrade to h2c, received 404
19:06:47 info failed to dial gRPC

I have another machine (nixos) with podman 4.9.3. It seems that podman added the support of the command podman buildx version in-between as on my ubuntu machine this command returns an error but not on my nixos machine. Devpod uses the result of this command to choose between the internal buildkit and the docker buildx builder. When the command fails it chooses the internal buildkit which, I think, is not compatible with buildah (podman builder) as all APIs of buildkit have not been implemented yet.

What did you expect to happen instead?

Devpod is able to run with older version of podman.

How can we reproduce the bug? (as minimally and precisely as possible)

My devcontainer.json:

{
        "name": "test",
        "image": "ubuntu:jammy-20240212",
        "runArgs": [
                "--userns",
                "keep-id"
        ],
        "features": {
"any feature"
        }
}

Local Environment:

DevPod Provider:

Anything else we need to know?

It shall be possible to check the real client passed as DOCKER_PATH. When it is podman, the builder shall be buildx and not the internal buildkit.

89luca89 commented 5 months ago

Thanks @aacebedo will take a look!

aacebedo commented 5 months ago

It shall be fixed now

89luca89 commented 5 months ago

Oh great that PR you opened fixed it :+1: thanks!