我有一个 Dockerfile
COPY ./docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
USER postgres
ENTRYPOINT ["/docker-entrypoint.sh"]
其中 docker-entrypoint.sh 是:
#!/bin/sh
# Before PostgreSQL can function correctly, the database cluster must be initialized:
initdb -D /var/lib/postgres/data
#start postgres server
/usr/bin/postgres -D /var/lib/postgres/data &
# create a user or role
psql -d postgres -c "CREATE USER someuser WITH PASSWORD 'jkhkjah';"
# create database
psql -d postgres -c "CREATE DATABASE dockertest OWNER 'someuser';"
它不会创建 someuser 和 dockertest 数据库。这该怎么做