Hi,
The image is built successfully, but I want to create the database on it at the time it is built. Everytime I do so it gives me the error that the postgresql is down.
When I create/build the image without that script which is suppose to create the databases it works fine.
How can I get the databases created at the time I am building the image with Dockerfile ?
Part of my Dockerfile is as follows
VOLUME [“/var/lib/pgsql”]
USER postgres
CMD [“/bin/bash”, “/usr/local/bin/postgresql.sh”]
EXPOSE 5432
RUN /var/lib/pgsql/CreateDatabase.sh