devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Validating container engine status

Open ssbarnea opened this issue 3 years ago • 0 comments

We need to identify the steps that we need to perform in order to validate that the current container engine (podman or docker) are usable for us.

That has a direct applicability in two places: vscode-ansible extension and ansible-navigator. Sadly one is JavaScript based and the other Python, so we will not be able to share the check implementation.

MacOS M1

  • MacOS M1 with podman arm64 with not run our container and throw a exec container process /usr/bin/entrypointerror, which indicates mismatched architecture. Workaround for this is to runpodman machine ssh bash -c "sudo rpm-ostree install qemu-user-static && sudo systemctl reboot"` and try again, assuming that the machine was not outdated and already initialized and started.... so many things that can get wrong.
  • MacOS M1 with docker arm64 with run our container and display a warning:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

This warning can be avoided if we pass --platform linux/amd64 to docker pull and run commands.

Fedora 36 arm64

  • podman with fail to run our image unless we install qemu-user-static package. There is no indication that this might help the user and even after this, it will be very slow.
  • docker (not tested)

Further work

  • [ ] Windows 10/11 on amd64 and arm64
  • [ ] Ability to use volume mounts
  • [ ] Detect if current engine is remote (primary cause for volume mounts to not work)

References

  • https://github.com/containers/podman/discussions/12899
  • https://github.com/containers/podman/discussions/14289#discussioncomment-2783293
  • https://github.com/ansible/creator-ee/issues/67

ssbarnea avatar May 19 '22 13:05 ssbarnea