kartoza / docker-postgis

Dockerfile for postgis
GNU General Public License v2.0
655 stars 316 forks source link

Failed to run container #468

Closed jyrkka closed 7 months ago

jyrkka commented 7 months ago

What is the bug or the crash?

Cannot run the container because setup scripts fails to delete /etc/ssl directories.

docker run --pull always kartoza/postgis:16-3.4

16-3.4: Pulling from kartoza/postgis
Digest: sha256:b0404f25856095493830d912ce4638e469e63d58fb1d627a05ebded5bfdcba41
Status: Image is up to date for kartoza/postgis:16-3.4
Creating /settings directory
Creating /docker-entrypoint.initdb.d directory
rm: cannot remove '/etc/ssl/certs': Invalid argument
rm: cannot remove '/etc/ssl/private': Invalid argument

Steps to reproduce the issue

Run

docker run --pull always kartoza/postgis:16-3.4

Versions

kartoza/postgis:16-3.4

Additional context

Following line is the culprit: https://github.com/kartoza/docker-postgis/blob/75717923a2750533110cf12ce005b0b5c0e0345a/scripts/setup-ssl.sh#L17

Would adding force flag to rm command fix this issue?

Docker info

Client: Docker Engine - Community
 Version:    25.0.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.13.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 4
 Server Version: 25.0.4
 Storage Driver: overlay2
  Backing Filesystem: zfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 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: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.0-1034-oem
 Operating System: Ubuntu 22.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 24
 Total Memory: 31.01GiB
 Name: name
 ID: 6f73d4c8-6977-471b-baa3-f8de73670617
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
jyrkka commented 7 months ago

Based on information from search engines that this problem is related to zfs & overlay2 combination.

See e.g.: