Docker rootless postgres container stops with error OCI runtime 367 and linux.go 495

Hi,
This is my first post to the Docker community. I’ve been researching this issue a long time now, searched the forums, looked at the topic similar to and I still need help. Please let me know if this is the wrong forum.

Ubuntu 20.04.2 Linux
Docker Engine - Community 20.10.6
Docker Compose 1.28.5
docker-py version: 4.4.4
uses btrfs
Postgres image latest

I’ve followed the Docker and Docker Compose documentation on setting up rootless docker for a Ubuntu Linux environment. I can run commands such as docker version but I use PyCharm gui mainly. I pulled the latest Postgres image successfully and tried to start a container but got the error:

com.intellij.remoteServer.util.ServerRuntimeException:
OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied: unknown

from terminal when trying to start container 264:
Error response from daemon:
OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key kernel.domainname: open /proc/sys/kernel/domainname: permission denied: unknown
Error: failed to start containers: 264

I verified the docker service is running with systemctl status docker.service. Root gives same. I’m really stuck here.

Can someone help?

Did I miss any needed info? Any direction will be helpful.

Did you ever figure out the cause for this?

It would be nice to see the command that tried to start the container and anything that you tried but did not help so we don’t need to recommend the same nonworking solutions. Can you show your command?

If I had to guess I would say it is a docker run that uses --domainname or --hostname.

here is a similar issue: