Coder Social home page Coder Social logo

Comments (5)

yosifkit avatar yosifkit commented on July 24, 2024

Oh, good point. Do you want to make a PR for it? The easy way to do it for this repo is to update Dockerfile.template and then run update.sh. If you want to just update the template I can run the update afterward.

from postgres.

mmarzantowicz avatar mmarzantowicz commented on July 24, 2024

Is it OK to put it just after line 33 or should it go before 39?

from postgres.

tianon avatar tianon commented on July 24, 2024

I'd actually prefer it be added just above line 18 there so that we get maximum cache-potential out of it (especially since it'll be an empty layer).

from postgres.

mmarzantowicz avatar mmarzantowicz commented on July 24, 2024

Apologize, I was to quick in my "improvement" proposition. I've just read docker docs and there is written about COPY instruction that :

If doesn't exist, it is created along with all missing directories in its path.

Doing simple COPY (or ADD) of initialization script in derived image should be sufficient to create /docker-entrypoint-initdb.d directory.

Maybe we can provide some example in docs so users have no doubts how to play nicely with custom scripts.

from postgres.

tianon avatar tianon commented on July 24, 2024

I think having the explicit "mkdir" would still be useful, since then we
can easily do things like "RUN echo 'some-stuff-here'

/docker-entrypoint-initdb.d/myscript.sh" without having to mkdir
ourselves first. It's also less surprising for users if we say "put your
scripts in XYZ directory" and XYZ actually exists. :)

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.