I made a Confluence on a VM and a Postgres on the other one. I synchronized them by configuring pg_hba.conf for Postgres and confluence.cfg.xml for Confluence that they are working well.
However, I wanted to use containerized dockers method for this purpose to ship and run more easily. So for Confluence, pulled a CentOS image, ran its container and transferred confluence VM files to the CentOS container by "docker cp" command. Entered to confluence.cfg.xml and edited it based on my Postgres variables, made an image by "docker commit" and finally ran a container as following:
docker run -it -p 8090:8090 confimg
In next step, I provided a backup from my Postgres VM by "pg_dump confdb". Pulled a Postgres image, ran its container and copied dumped file to this container. Made a database, user, granted all privileges and extracted dumped files to it. Configured pg_hba.conf and made an image and ran a Postgres container.
Now we expected to use it flawless in browser by entering:
http://192.168.100.176:8090/
But can be seen an error like this:
BootstrapException: Unable to bootstrap application: Failed to parse config file: Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
I received this error however my containers works without any issue.