docker pull postgres

docker run --name postgres -e POSTGRES_PASSWORD=Docker_postgres_5432 -p 5432:5432 --shm-size 32g -v /dp/docker/file/postgresql/data:/var/lib/postgresql/data -d postgres


--shm-size 32g :设置共享内存,避免以下异常
ERROR: could not resize shared memory segment "/PostgreSQL.353004014" to 857