docker-library / mysql

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

Cannot Pull image in rootless docker mode #1073

Closed TryAnixx closed 2 days ago

TryAnixx commented 3 days ago

Hey folks!

I am trying to pull the mysql:8.2.0 / mysql:latest image in rootless docker

Expected behavior:

actual behavior: ``failed to register layer: failed to Lchown "/dev/console" for UID 0, GID 0: lchown /dev/console: no such file or directory```

subuid: docker-admin:100000:65536

subgid: docker-admin:100000:65536

Outpout of Docker Version:

Client: Docker Engine - Community
 Version:           27.0.1
 API version:       1.46
 Go version:        go1.21.11
 Git commit:        7fafd33
 Built:             Mon Jun 24 14:58:03 2024
 OS/Arch:           linux/amd64
 Context:           rootless

Server: Docker Engine - Community
 Engine:
  Version:          27.0.1
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       ff1e2c0
  Built:            Mon Jun 24 14:58:03 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
 rootlesskit:
  Version:          2.0.2
  ApiVersion:       1.1.1
  NetworkDriver:    slirp4netns
  PortDriver:       builtin
  StateDir:         /run/user/1000/dockerd-rootless
 slirp4netns:
  Version:          1.2.1
  GitCommit:        09e31e92fa3d2a1d3ca261adaeb012c8d75a8194

Output of docker info:

Client: Docker Engine - Community
 Version:    27.0.1
 Context:    rootless
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 5
  Running: 5
  Paused: 0
  Stopped: 0
 Images: 8
 Server Version: 27.0.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: true
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  rootless
  cgroupns
 Kernel Version: 6.8.0-35-generic
 Operating System: Ubuntu 24.04 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.731GiB
 Name: sf-docker1
 ID: 002f2b39-30a0-4a59-b858-68615345db5d
 Docker Root Dir: /home/docker-admin/.local/share/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No cpuset support
WARNING: No io.weight support
WARNING: No io.weight (per device) support
WARNING: No io.max (rbps) support
WARNING: No io.max (wbps) support
WARNING: No io.max (riops) support
WARNING: No io.max (wiops) support

Its only this image...

tianon commented 2 days ago

I bet you'd get the same failure trying to pull oraclelinux :eyes: (because that should be the only reason this image might have non-empty /dev content in it)

TryAnixx commented 2 days ago

https://github.com/docker/for-linux/issues/1497#issuecomment-2192125441

tianon commented 2 days ago

Nice, glad you found a more direct/actionable root cause :+1:

(I'm going to go ahead and close this since this isn't something intentionally added by the mysql image nor something we could actionably fix at this level :bow:)