Public bug reported:

Issue originally reported here:
https://github.com/moby/moby/issues/47720

### Description

When a container is stopped, the quit and kill signal get blocked by
AppArmor.

Workaround:
The only way I have found to bypass this issue is to disable apparmor for 
docker by setting environment variable `container` to any value.

See this:
https://github.com/moby/moby/issues/33060#issuecomment-2056845779 for
details.

### Reproduce

Setup clean version of Ubuntu 23.10

`apt update`
`apt full-upgrade -y`
`apt install -y docker.io`
`reboot`

Try this multiple times:
`time docker stop $(docker run --rm -d nginx)`


Observe time taken is around 12 seconds.

Now do my workaround linked above, or disable apparmor system wide.

Now try the same again a few times:
`time docker stop $(docker run --rm -d nginx)`

Observe time taken is only around 1 second.

My workaround is required because [it is not possible to modify, edit,
view or anything the docker-default apparmor profile
https://github.com/moby/moby/issues/33060, or you can disable AppArmor
system wide.

### Expected behavior

`docker stop` should not be blocked by AppArmor.

** Affects: docker.io (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apparmor container docker docker.io

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2063099

Title:
  Stopping container signal blocked by AppArmor on Ubuntu

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/2063099/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to