Git Product home page Git Product logo

Comments (6)

LaurentGoderre avatar LaurentGoderre commented on September 18, 2024

@CitationGraham that is by design. This is how database initialization works.

from postgres.

CitationGraham avatar CitationGraham commented on September 18, 2024

@LaurentGoderre I am not sure the inability to override the username or at least the password after first running makes any sense in a Docker context...

You can hack around with the ENTRYPOINT to accomplish the same outcome; the expectation is to be able to do it more simply and cleanly with the same ENV used earlier in the process.

from postgres.

Harryalways317 avatar Harryalways317 commented on September 18, 2024

did you tried doing that without the volume?

from postgres.

tianon avatar tianon commented on September 18, 2024

See also https://hub.docker.com/_/postgres, especially:

Warning: the Docker specific variables will only have an effect if you start the container with a data directory that is empty; any pre-existing database will be left untouched on container startup.

I agree that not being able to reconfigure is a bit unusual, but a database without persistence is even more unusual and users/authentication are a property of the initialized database (and maintained via the data directory/database itself after initialization). 😄

from postgres.

CitationGraham avatar CitationGraham commented on September 18, 2024

@tianon the specific use case for this, is baking data into a testing database that can be shipped as an image for parallel test runs.

Currently we face a choice between really really slow startup (copying into /docker-entrypoint-initdb.d at build then loading at run) or loading at build-time and having essentially broken authentication.

The three other database products we use all allow overriding credentials at runtime.

from postgres.

LaurentGoderre avatar LaurentGoderre commented on September 18, 2024

@CitationGraham creating another user wouldn't work in your use case?

from postgres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.