If you are able to connect and issues "SHOW data_directory" you have a running server and its data files are present at that location - from the perspective of the server. I suspect you are performing your verification by looking at the client's file system.
It would behoove you to copy/paste an entire shell script session, and probably the Dockerfile + "docker run" invocation, to a new thread on pgsql-general@postgresql.org if you wish others to assist you in understanding exactly what is going on.
Чтобы сделать работу с сайтом удобнее, мы используем cookie и аналитический сервис «Яндекс.Метрика». Продолжая пользоваться сайтом, вы соглашаетесь с их использованием.