docker-library/drupal

Drupal asking for installation after drupal container moved to another host

akhandelwaal opened this issue · 4 comments

Hi,
I created an instance of drupal image and connected with an instance of postgres image. Started setting up my website. After a while I wanted to move these containers to another host so I created images from both containers. Moved images to another host after making .tar.gz files and created containers there. I also updated the new IP address of postgres instance in settings.php file in dupal instance. But when I am going to site, it's asking for installing drupal. Install.php page is opened. i thought i would be able to continue building my site from another host. Please help.
Thanks,
Ankit

it's asking for installing drupal. Install.php page is opened

@akhandelwaal this happens when Drupal can't find a settings.php file with the database credentials.

What volumes were you mounting into your previous container, and into your new container? You need settings.php (as well as your files directories) to be mounted into the container from the host in order for these things to be persisted when the container is destroyed. See https://github.com/docker-library/docs/tree/master/drupal#volumes

it's asking for installing drupal. Install.php page is opened

@akhandelwaal this happens when Drupal can't find a settings.php file with the database credentials.

What volumes were you mounting into your previous container, and into your new container? You need settings.php (as well as your files directories) to be mounted into the container from the host in order for these things to be persisted when the container is destroyed. See https://github.com/docker-library/docs/tree/master/drupal#volumes

Thanks @mstenta for quick response. As I said I updated the correct data base connection credentials in setting.php before opening the site (localhost:8080). Also if I created the image of my container from previous host then why would I need to mount a volume. All the data and files are inside the container and should have embedded with the image I created.

Can you list all the commands that you ran (and any other steps or relevant config files) so that we can reproduce?

There are no VOLUMES defined in the image, so as long as you didn't define any when running the image, a docker commit and docker save should be enough to move it to a new docker host.