geerlingguy / ansible-role-docker

Ansible Role - Docker
https://galaxy.ansible.com/geerlingguy/docker/
MIT License
1.84k stars 857 forks source link

"No package matching 'docker-ce' is available" on Raspberry OS Lite Bullseye 64bit #402

Closed paranerd closed 9 months ago

paranerd commented 1 year ago

Hi,

I keep getting the above error on a fresh install of Raspberry OS Lite Bullseye (64bit). Checked out "ansible-role-docker_arm" and it says that "ansible-role-docker" has full support for arm64 by now. All is fine when going the manual route with the "get-docker.sh" convenience script, though.

Any suggestions? I would really love to use this role to automate Docker installation over the "_arm" version as it provides some crucial advantages (like configuring Docker daemon options)

Thanks in advance!

j-koehler commented 1 year ago

Hm thats strange. I'm running Raspbian/Raspberry OS as well (also Bullseye) and it worked super good so with some minor adjustments (but did not do a basic setup for quite some time (5.0.0 - it's 6.1.0 now)).

To figure out whats going on - could you add some debug step to your playbook? What would be interesting is probably

{{ ansible_architecture }}
{{ docker_apt_arch }}
{{ docker_apt_repository }}

(Imho) this should be the major variables giving more insight on this.

paranerd commented 1 year ago

Sure, here you go:

paranerd commented 1 year ago

Did some testing and have some confusing findings:

When I set docker_apt_arch: arm64 manually, everything seems to work fine. This was to be expected.

The confusing part comes here: Having docker_apt_arch2: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}" in my vars: I get the expected arm64.

j-koehler commented 1 year ago

When I set docker_apt_arch: arm64 manually, everything seems to work fine. This was to be expected.

Yeah back in the days™ i used this. Looks like on some way to the current version Jeff introduced the improved automatic detection.

This is really strange though. I can not spot any obvious error (especially since you do this with just an additional variable and there it works) and unfortunately my Ansible knowledge ends here (working just fro looking at things without trying it out - and I don't have a spare Raspi to actually try it/not enough experience to use Ansible to "provision" a running Docker container)

From my perspective you could easily solve this by just setting/overwriting docker_apt_arch, no? Bit hacky solution but maybe the fastest way to get things done.

paranerd commented 1 year ago

Thank you for looking into this. I will probably go with the workaround of setting docker_apt_arch: arm64 manually. Still keeping this issue open, maybe someone else stumbles upon it 😊

j-koehler commented 1 year ago

What you could do: run in dry and verbose mode, maybe you can see something from this or post the logfile.

stale[bot] commented 1 year ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

DJviolin commented 1 year ago

docker_apt_arch: arm64 did the trick for me, too! Thank You!

github-actions[bot] commented 11 months ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] commented 9 months ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.