Created
September 5, 2016 09:17
-
-
Save onjin/2dd3cc52ef79069de1faa2dfd456c945 to your computer and use it in GitHub Desktop.
example docker compose for postgresql with db init script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table sometable(id int); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It depends on docker image you're using if it is supporting entry scripts and how. For postgres docker image it's you can see execution here:
For your image you need to check the documentation of source code if it's available.