docker-library / mysql

Docker Official Image packaging for MySQL Community Server
https://dev.mysql.com/
GNU General Public License v2.0
2.47k stars 2.19k forks source link

chown: changing ownership of './proc/46/task/46': Operation not permitted #917

Closed 0ck0 closed 2 years ago

0ck0 commented 2 years ago

system info

$ uname -a Linux docker 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release LSB Version: :core-4.1-amd64:core-4.1-noarch

$ cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

docker info

$ docker info Client: Context: default Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Docker Buildx (Docker Inc., v0.9.1-docker) compose: Docker Compose (Docker Inc., v2.10.2) scan: Docker Scan (Docker Inc., v0.17.0)

Server: Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 6 Server Version: 20.10.18 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc version: v1.1.4-0-g5fd4c4d init version: de40ad0 Security Options: seccomp Profile: default Kernel Version: 3.10.0-1160.76.1.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 7.375GiB Name: docker ID: PCXC:SOXV:4LS5:EWAJ:YHTH:AMV7:HO2S:FZ2P:HEAM:ZU2O:ZK2R:25VL Docker Root Dir: /data/docker_data Debug Mode: false Username: tangck Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Registry Mirrors: https://hub-mirror.c.163.com/ https://mirror.baidubce.com/ https://docker.mirrors.ustc.edu.cn/ Live Restore Enabled: true

docker run

$ docker run -it --name mysql --user root:root --privileged -v /data/mysql/my.cnf:/etc/mysql/my.cnf -v /data/mysql/datadir:/var/lib/mysql -e MYSQL_DATABASE=gooddb -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 mysql:5.7

error log

...... ..... .... ...

more error logs like :[ chwon: changing ownership of './proc/xxxxx' Operation not permitted ]

... .... ..... ......

chown: changing ownership of './proc/sys/vm/min_unmapped_ratio': Operation not permitted chown: changing ownership of './proc/sys/vm/mmap_min_addr': Operation not permitted chown: changing ownership of './proc/sys/vm/mmap_rnd_bits': Operation not permitted chown: changing ownership of './proc/sys/vm/mmap_rnd_compat_bits': Operation not permitted chown: changing ownership of './proc/sys/vm/nr_hugepages': Operation not permitted chown: changing ownership of './proc/sys/vm/nr_hugepages_mempolicy': Operation not permitted chown: changing ownership of './proc/sys/vm/nr_overcommit_hugepages': Operation not permitted chown: changing ownership of './proc/sys/vm/nr_pdflush_threads': Operation not permitted chown: changing ownership of './proc/sys/vm/numa_zonelist_order': Operation not permitted chown: changing ownership of './proc/sys/vm/oom_dump_tasks': Operation not permitted chown: changing ownership of './proc/sys/vm/oom_kill_allocating_task': Operation not permitted chown: changing ownership of './proc/sys/vm/overcommit_kbytes': Operation not permitted chown: changing ownership of './proc/sys/vm/overcommit_memory': Operation not permitted chown: changing ownership of './proc/sys/vm/overcommit_ratio': Operation not permitted chown: changing ownership of './proc/sys/vm/page-cluster': Operation not permitted chown: changing ownership of './proc/sys/vm/panic_on_oom': Operation not permitted chown: changing ownership of './proc/sys/vm/percpu_pagelist_fraction': Operation not permitted chown: changing ownership of './proc/sys/vm/stat_interval': Operation not permitted chown: changing ownership of './proc/sys/vm/swappiness': Operation not permitted chown: changing ownership of './proc/sys/vm/user_reserve_kbytes': Operation not permitted chown: changing ownership of './proc/sys/vm/vfs_cache_pressure': Operation not permitted chown: changing ownership of './proc/sys/vm/zone_reclaim_mode': Operation not permitted chown: changing ownership of './proc/1': Operation not permitted chown: changing ownership of './proc/1/task/1': Operation not permitted chown: changing ownership of './proc/46': Operation not permitted chown: changing ownership of './proc/46/task/46': Operation not permitted chown: cannot access './proc/46/task/46/fd/5': No such file or directory chown: cannot access './proc/46/task/46/fdinfo/5': No such file or directory chown: cannot access './proc/46/fd/5': No such file or directory chown: cannot access './proc/46/fdinfo/5': No such file or directory

0ck0 commented 2 years ago

The my.cnf configuration file parameters are incorrectly set