Posts

Showing posts with the label Deploy Docker in Container Environment

Deploy Existing Drupal Website in Container Environment

  Create web and DB images Seperately. So create seperate Dockerfiles for WEB and DB FOR DB Take DB backup and put it in same place with DB dokcerfile FROM mariadb:latest as builder # That file does the DB initialization but also runs mysql daemon, by removing the last line it will only init RUN ["sed", "-i", "s/exec \"$@\"/echo \"not running $@\"/", "/usr/local/bin/docker-entrypoint.sh"] # needed for intialization ENV MYSQL_ROOT_PASSWORD=root COPY *.sql /docker-entrypoint-initdb.d/ # Need to change the datadir to something else that /var/lib/mysql because the parent docker file defines it as a volume. # https://docs.docker.com/engine/reference/builder/#volume : # Changing the volume from within the Dockerfile: If any build steps change the data within the volume after # it has been declared, those changes will be discarded. RUN ["/usr/local/bin/docker-entrypoint.sh", "mysqld", "-...