Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: docker-library/postgres
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ogheorghies/postgres
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 13 files changed
  • 1 contributor

Commits on Feb 9, 2020

  1. Add support for database update scripts.

    The files /docker-entrypoint-updatedb.d/* are run every time a container starts, even if the database directory is not empty. This is unlike the files /docker-entrypoint-initdb.d/*, which are only run iif the database directory is empty. When the database directory is empty, the update scripts are run after the init scripts.
    
    Suppose that the following files are present in a container image:
    /docker-entrypoint-initdb.d/init.sh
    /docker-entrypoint-updatedb.d/update.sh
    
    When a new container is run for the first time with a persistent volume, for example as follows:
    
    $ docker run --rm -it \
    	-v ./my-initdb.d:/docker-entrypoint-initdb.d \
            -v ./my-updatedb.d:/docker-entrypoint-updatedb.d \
    	-v my-vol:/var/lib/postgresql/data postgres
    
    the following init files are run, in this order:
    
    /docker-entrypoint-initdb.d/init.sh
    /docker-entrypoint-updatedb.d/update.sh
    
    If the container is stopped and a new container is started with the same command, only this file is run:
    
    /docker-entrypoint-updatedb.d/update.sh
    ogheorghies committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    9a54593 View commit details
    Browse the repository at this point in the history
Loading