천객만래 [千客萬來] (It has an interminable succession of visitors)

'docker container'에 해당되는 글 1건

  1. 2021.03.01 docker container stop 안될 때 또는 docker-compose down 안될 때

docker container stop 안될 때 또는 docker-compose down 안될 때

 

시스템관리자가 해줘야 할 일:  AppArmor가 일을 똑바로 안해서 발생;

docker 설치 후 발생 할 수 있는 문제

$ docker stop python

Error response from daemon: cannot stop container: python: Cannot kill container c2ea9333f97082d88578268f269657aa43e12d7b561b3503a64aa8b4738ee98a: unknown error after kill: runc did not terminate sucessfully: container_linux.go:392: signaling init process caused "permission denied"
: unknown


아래는 해결책

# For anyone that does not wish to completely purge AppArmor.
# Check status:
$ sudo aa-status

# Shutdown and prevent it from restarting:
$ sudo systemctl disable apparmor.service --now

Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apparmor

# Unload AppArmor profiles:
$ sudo service apparmor teardown

 * Unloading AppArmor profiles


# Check status:
$ sudo aa-status
# You should now be able to stop/kill containers.

apparmor module is loaded.
0 profiles are loaded.
0 profiles are in enforce mode.
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

# 이제 명령어 권한이 동작함
$ docker stop python

 
반응형
Posted by 사용자 SB패밀리

댓글을 달아 주세요