Comments (8)
Isn't this going to be application specific, especially since most apps will have some default schema and stuff to push in, too?
from postgres.
It's useful for the case where an application expects a database to exist and automatically populates it with tables.
from postgres.
The initdb
that is run in the entrypoint when starting postgres automatically creates a postgres database. Here is what I find via psql:
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+-----------+---------+-------+-----------------------
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
Does it need more than this? This is exactly what is there by default on a normal apt-get install postgresql
. We tell it not to do the initdb so it can be done in the entrypoint (after any volume mounts).
from postgres.
Oh, cool. Is the "postgres" database empty and usable for user data?
from postgres.
No relations found.
All the system data is in pg_catalogue.
from postgres.
Perfect! Could we make clear in the description that there is a user postgres
without auth and a database postgres
that can be used for user data?
from postgres.
Yes, we are working to make the docker hub descriptions part of the git, so that it is easier to update (with a PR). I will add it to our list to update it.
from postgres.
Perfect. Thanks @yosifkit!
from postgres.
Related Issues (20)
- Postgres docker image 15.3 is rebuilt and does not work for us anymore. HOT 5
- PANIC: could not locate a valid checkpoint record
- Postgres container fails to start due to permissions issue HOT 1
- "Can't execute 'bash' error" on Alpine image HOT 1
- Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "smartloy_user" HOT 6
- Critical/High Severity issues reported by Snyk for postgres:15.6 HOT 2
- Add an option to skip DB init check HOT 2
- Postgres Auto Dropping the DB Randomly - database "template0" is not currently accepting connections HOT 2
- Multiple CVEs flagged by JFrog for postgres:14 HOT 3
- Unable to override login credentials for already initialized database HOT 6
- SQL files under docker-entrypoint-initdb.d are not executed even if data directory is not initialized HOT 1
- Secrets file not detected on startup HOT 2
- Initialization script when PGData is not empty HOT 8
- Failure oracle-libs installation
- Skip postgres restart on first run HOT 1
- Reproducible SIGSEGV in query HOT 1
- Separating config using PGDATA does not seem to behave as described in the docs HOT 11
- Upgrade older images to OCI Format or Docker Image manifest v2, schema 2 HOT 3
- Add a HEALTHCHECK to the images HOT 2
- include_dirs env var HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postgres.