title: Create Schema for a specific Database in docker-entrypoint.sh
body: <p>How do I create new Schema to a specific database in the shell script <code>docker-entrypoint.sh</code> of docker. </p>
  
  <pre><code>sudo -u postgres psql -c "ALTER user postgres WITH PASSWORD 'postgres'"
  sudo -u postgres psql -c "CREATE DATABASE example;"
  sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE example TO postgres;"
  sudo -u postgres psql -c "CREATE SCHEMA production;"
  sudo -u postgres psql -c "\dn"
  </code></pre>
  
  <p>In postgres there is no "use database" like mysql, so how can i specify this to the <code>example</code> database. At the moment the new Schema <code>production</code> goes to the <code>postgres</code> database in postgres as default. </p>