MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.83k stars 495 forks source link

DietPi-Software | Docker: Service fails to start after upgrade (AppArmor) #6126

Closed samjw-nz closed 1 year ago

samjw-nz commented 1 year ago

ADMIN EDIT

Workaround

apt install apparmor
systemctl disable --now apparmor
systemctl restart docker

Creating a bug report/issue

Required Information

Additional Information (if applicable)

Steps to reproduce

  1. Install Docker from dietpi-software (optional)
  2. Install Portainer from dietpi-software (with or without first installing Docker, as it's installed if not already present)
  3. Allow Portainer image to pull and then fail by itself.

Expected behaviour

Actual behaviour

Extra details

Joulinar commented 1 year ago

will it be possible to remove apparmor?

Yes should be possible afterwards.

MichaIng commented 1 year ago

Great to see a solution merged 👍.

madmedix commented 1 year ago

Me too last night: Rock64 1G fresh install (cb0d547c-e913-47ca-b648-e40893a0b3e9), nothing else installed - I checked on Docker and Portainer. I give the above a go too. Cheers,

Joulinar commented 1 year ago

There is no other way around until Docker Devs fixed it. Until a new Docker version is available, the the above workaround is needed.

MichaIng commented 1 year ago

Docker v23.0.1 has been released, issue solved.

Joulinar commented 1 year ago

@MichaIng not sure if the issue has been fixed fully. There is still an issue for apparmor but with a different error now.

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.
MichaIng commented 1 year ago

Your right...

MichaIng commented 1 year ago

Ah, it has been reverted in containerd now, the only real fix: https://github.com/containerd/containerd/pull/8086 But milestone is containerd 1.7 🤔. ... ah no backported to v1.6 as well: https://github.com/containerd/containerd/pull/8087

Let's hope for a soon containerd release then.

MichaIng commented 1 year ago

containerd v1.6.18 with the fix has been released, but while the error message has changed containers still do not start:

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown.

Looks like it will be fully resolved Docker-side with: https://github.com/moby/moby/pull/44982

MichaIng commented 1 year ago

Finally, with the latest docker-ce update from today the issue is solved. I didn't expect this to take so long.

Joulinar commented 1 year ago

related release notes from Docker side https://docs.docker.com/engine/release-notes/23.0/#2302