openssl req -new -509 -days 365 -nodes -text -out server.crt (n -keyout server key -subj "/CN=localhost"
Run the following commands to copy cert files to the container and update permissions:
docker cp server.crt «CONTAINER_ID>:/var/lib/pgsql/data/userdata/
docker cp server. key «CONTAINER_ID>:/var/lib/pgsql/data/userdata/