Created
December 14, 2018 22:46
-
-
Save geerlingguy/5998fe7cd13520498df0578b9ba366ea to your computer and use it in GitHub Desktop.
BLT Docker Image Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: Your base image should contain all the PHP extensions required by your project. | |
FROM my/base-drupal-container:latest | |
# Set the project machine name here. | |
ENV PROJECT my-blt-project | |
# Copy the deployment artifact into place. | |
COPY deploy/ /var/www/$PROJECT | |
# Copy the Drupal container settings file into place. | |
COPY docker/settings.container.php /var/www/$PROJECT/docroot/sites/default/settings.container.php | |
# Set a custom docroot since BLT uses 'docroot'. | |
ENV APACHE_DOCUMENT_ROOT /var/www/$PROJECT/docroot | |
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
# Set appropriate permissions on sites/default directory. | |
RUN chmod 665 /var/www/$PROJECT/docroot/sites/default | |
# Set appropriate permissions on public files directory. | |
RUN mkdir -p /var/www/$PROJECT/docroot/sites/default/files \ | |
&& chown www-data:www-data /var/www/$PROJECT/docroot/sites/default/files | |
WORKDIR /var/www/$PROJECT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You'd probably be better moving off to one of those other solutions; Drupal VM's docker functionality is not aligned with the way most of the
blt
integration is set up to work (note that BLT and Drupal VM are separate but related projects).