I am trying to startup or some docker containers or at least busy with the docker containers. After first installation every thing whas working perfect. and dint do any thing different than just docker-compose up down stop restart and also making some wordpress containers and PHPmyadmin and MariaDB. But now when i try to shutdown the docker container it gives me permissions denied.
I have search every thing so far on the web like adding www-data to the groups or try with sudo to kill it. Removet the containers and images with out any results.
david@david-Notebook-P14:~/Desktop/docker-projects$ docker-compose up
Starting mailhog ... done
Starting docker-projects_wordpress_db_1 ... done
Starting docker-projects_wordpress_1 ... done
Starting docker-projects_phpmyadmin_1 ... done
Attaching to docker-projects_wordpress_db_1, mailhog, docker-projects_wordpress_1, docker-projects_phpmyadmin_1
wordpress_db_1 | 2019-05-14 8:13:31 0 [Note] mysqld (mysqld 10.3.14-MariaDB-1:10.3.14+maria~bionic) starting as process 1 ...
mailhog | 2019/05/14 08:13:30 Using in-memory storage
mailhog | 2019/05/14 08:13:30 [SMTP] Binding to address:
mailhog | 2019/05/14 08:13:30 Serving under http://0.0.0.0:8025/
mailhog | [HTTP] Binding to address: 0.0.0.0:8025
mailhog | Creating API v1 with WebPath:
mailhog | Creating API v2 with WebPath:
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.4. Set the 'ServerName' directive globally to suppress this message
wordpress_1 | [Tue May 14 08:13:34.311188 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.18 configured -- resuming normal operations
wordpress_1 | [Tue May 14 08:13:34.345515 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
^CGracefully stopping... (press Ctrl+C again to force)
Stopping docker-projects_wordpress_1 ... error
Stopping docker-projects_phpmyadmin_1 ... error
Stopping mailhog ... error
Stopping docker-projects_wordpress_db_1 ... error
ERROR: for docker-projects_phpmyadmin_1 b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
david@david-Notebook-P14:~/Desktop/docker-projects$ docker-compose down
Stopping docker-projects_wordpress_1 ... error
Stopping docker-projects_phpmyadmin_1 ... error
Stopping mailhog ... error
Stopping docker-projects_wordpress_db_1 ... error
ERROR: for mailhog b'cannot stop container: 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: Cannot kill container 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
ERROR: for docker-projects_wordpress_1 b'cannot stop container: 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: Cannot kill container 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
ERROR: for docker-projects_phpmyadmin_1 b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
david@david-Notebook-P14:~/Desktop/docker-projects$ ps aux | grep dockerd
root 1120 0.3 1.8 493900 71232 ? Ssl 09:32 0:08 dockerd -G docker --exec-root=/var/snap/docker/384/run/docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/var/snap/docker/384/run/docker.pid --config-file=/var/snap/docker/384/config/daemon.json --debug
root 1559 0.0 1.0 781576 40784 ? Ssl 09:32 0:01 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
david 6053 0.0 0.0 21540 1076 pts/0 S+ 10:17 0:00 grep --color=auto dockerd
david@david-Notebook-P14:~/Desktop/docker-projects$ sudo docker-compose down
[sudo] password for david:
Stopping docker-projects_wordpress_1 ... error
Stopping docker-projects_phpmyadmin_1 ... error
Stopping mailhog ... error
Stopping docker-projects_wordpress_db_1 ... error
ERROR: for docker-projects_phpmyadmin_1 b'cannot stop container: 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: Cannot kill container 6911429b36f56ed310c94b4fff91247abea44d9ce4524facd13409a2972df5f2: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
ERROR: for mailhog b'cannot stop container: 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: Cannot kill container 171cb796bfc6f72294dc66fc0d6277bedda358052db9a95fca6b05c5d0222959: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
ERROR: for docker-projects_wordpress_1 b'cannot stop container: 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: Cannot kill container 47f29abaf5027d626ea55c7bd4d24a4369f37207d8d723000daa65f6a3b330cf: unknown error after kill: docker-runc did not terminate sucessfully: container_linux.go:393: signaling init process caused "permission denied"\n: unknown'
I hope to get this permission problem solved. So far i cant find any solutions than hope some one could help me with this.
Thanks alot already
I got the solution:
[OPTIONAL] Just use
sudo systemctl stop apparmor
&&systemctl disable apparmor
After restarting docker using
sudo service docker restart
and then runreboot
This will solve the issue.