![]() ![]() On the other hand, if part of what you're doing is scripted - then you probably just need to add a Drush alias so Drush is able to locate your installation when a command is run outside of webroot see but you haven't said how you're installing Drupal so I can't say for sure. Ideally, you should just make your own distribution profile and this would enable the theme for the user on site-install (and allow you to make all your customisations in one place). Once the container is running, install Dependencies and install Drupal. Download latest release of Docker4Drupal and install as Vanilla Drupal or to an existing codebase. How to achieve what you desire very much depends on how you install Drupal after Docker has finished building? Ideally, you're doing this with an ENTRYPOINT script rather than manually - and if so, then after the install - enable the theme with Drush there. docker-compose up -d (Wait for the environment to come upyou can monitor the logs with docker-compose logs -f ). Now, I'm not familiar with the official Drupal Docker image but I'm sure it must be a simple PHP based container? The point being is that the last thing to happen is for PHP to actually be run, and until that point, MySQL is not running. What this Dockerfile does layer by layer FROM Drupal:8.7 to get a base server that has PHP and other dependencies needed to run a Drupal site RUN running an apt-get update and install of a couple extra packages we run into needing beyond what the base Drupal image gives us. ![]() The problem is that anything in the Dockerfile is part of the build process - which is used for creating an image that is finally run via CMD. ![]() Create a folder nginx and add Dockerfile into it, which will look like this: FROM nginx:alpine ADD nginx/nf /etc/nginx/conf. In order to install a module in Drupal you need access to the database with a working installation. Instead of using a pre-baked image from Docker Hub, we will make our own with Dockerfile inside nginx folder, because we want to change Nginx settings. Installing modules with composer is very different from installing them in Drupal. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |