Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Docker builds broken when both Podman and Docker are installed #19648

Open
2 tasks
leah-splitkb opened this issue Jan 20, 2023 · 3 comments
Open
2 tasks

Comments

@leah-splitkb
Copy link
Contributor

Describe the Bug

#19561 recently got merged into master.

However, after pulling it, I now get the following output instead of a properly working build:
image
This requires additional keyboard interaction, and only selecting the docker.io image works - the other images result in either manifest unknown or repo not found.

To my surprise, it turned out that QMK suddenly started using Podman instead of Docker!

I am running Fedora 35. I believe Podman was automatically installed, but I manually installed Docker because - as #19561 mentions - Podman does not have feature-parity with Docker. This is probably not an unusual scenario.

#19561 reordered the scripts to give priority to Podman because Podman does not support the Docker API 100%. The actual issue seemed to be that the scripts did not properly detect an aliased Podman, which meant to it accidentally using Docker-intended flags with Podman. Checking for Podman first meant it was now using the proper flags, but it also means that it switched the Docker backend for the people who genuinely have both installed. This seems like a mistake to me - and if not it is a rather large change to suddenly dump into master.

Basically, it seems it fixed the case where docker is aliased to Podman, but broke the case where both Docker and Podman are installed. It probably needs to be reverted and redone with proper alias detection.

@-ing @zvecr because he processed the original PR.

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

@sigprof
Copy link
Contributor

sigprof commented Jan 20, 2023

Having both Docker and Podman installed is probably a less usual configuration than having just Podman installed with its docker alias, and any choice would be wrong for some users in that case. But you can choose the runtime explicitly instead of relying on autodetection using one of these commands:

  • export RUNTIME=docker
  • export RUNTIME=podman

@leah-splitkb
Copy link
Contributor Author

That would make it significantly more complicated to use, though.
./util/docker_build.sh is extremely convenient if you want to just compile firmware without having to mess around with installing QMK itself to your system, but requiring an export significantly complicates it. This is something which should just work.

To be honest, I wouldn't even mind if it selected Podman by default if it actually worked, but it doesn't. I first get the image selection screen shown above, and even if I select the right image it still fails on a make: stat: Makefile: Permission denied.

I agree that it is not a very usual configuration, but the change still broke my workflow. For now I have just nuked Podman from my system, and I'm hoping that won't break anything.

@tzarc
Copy link
Member

tzarc commented Jan 25, 2023

I'm unsure how the alias comes into play -- the script execution is done in an external invocation of the shell, which under normal circumstances shouldn't be executing the login scripts. The alias shouldn't exist at the time, right? Only way I'd imagine it to be there is if it's symlink'ed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants