docker cannot stop container問題解決

docker 容器在啓動時出現異常,刪除容器或者暫停容器時會出現cannot stop containerjava

先使用sudo aa-remove-unknown ,再進行其餘操做linux

lgj@lgj-Lenovo-G470:~/java/start$ docker ps      
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4f36ce88f0af        d0d78741cdec        "java -jar /worker/b…"   43 minutes ago      Up 43 minutes       0.0.0.0:8703->8703/tcp   microblog-blog-web
lgj@lgj-Lenovo-G470:~/java/start$ docker start microblog-blog-web
microblog-blog-web
lgj@lgj-Lenovo-G470:~/java/start$ docker stop microblog-blog-web
Error response from daemon: cannot stop container: microblog-blog-web: Cannot kill container 4f36ce88f0af0a01ac675742de6e848576f1ba74f839267eec3dd4fa57d89f98: 
unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied": unknown

lgj@lgj
-Lenovo-G470:~/java/start$ aa-remove-unknown

/usr/sbin/aa-remove-unknown: 66: /usr/sbin/aa-remove-unknown: cannot open /sys/kernel/security/apparmor/profiles: Permission denied ERROR: Unable to read apparmorfs profiles file lgj@lgj-Lenovo-G470:~/java/start$ sudo aa-remove-unknown

[sudo] password
for lgj: Removing 'docker-default' lgj@lgj-Lenovo-G470:~/java/start$ docker stop microblog-blog-web microblog-blog-web lgj@lgj-Lenovo-G470:~/java/start$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

aa-remove-unknown將清點/etc/apparmor.d/中的全部配置文件,將該列表與當前加載到內核中的配置文件進行比較,而後刪除/etc/apparmor.d/中未找到的全部已加載配置文件。 它還將報告在標準輸出時刪除的每一個配置文件的名稱。 web

相關文章
相關標籤/搜索