Skip to content

Instantly share code, notes, and snippets.

@fabean
Last active November 2, 2019 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabean/f8784ab8da14ed28a74cf6539572f1a5 to your computer and use it in GitHub Desktop.
Save fabean/f8784ab8da14ed28a74cf6539572f1a5 to your computer and use it in GitHub Desktop.
Creating A Custom Docker Container For Your Drupal Website
FROM drupal:8.7
RUN apt-get update && apt-get install -y libxml2-dev imagemagick mysql-client --no-install-recommends
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN { \
echo 'memory_limit = 196M'; \
echo 'display_errors = Off'; \
echo 'post_max_size = 64M'; \
echo 'file_uploads = On'; \
echo 'upload_max_filesize = 64M'; \
echo 'max_file_uploads = 20'; \
} > /usr/local/etc/php/conf.d/codekoalas-settings.ini
RUN sed -i 's/\/var\/www\/html/\/var\/www\/html\/docroot/g' /etc/apache2/sites-available/000-default.conf
RUN rm -rf /var/www/html/*
COPY ./ /var/www/html
RUN apache2-foreground
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment