dbjpanda / drupal-devops

Drupal 8 devops workflow using Docker, Ansible, Composer and GIt . Developed in Google summer of Code 2018
4 stars 6 forks source link

Inherit image from alpine for making the size small #13

Open dbjpanda opened 6 years ago

dbjpanda commented 6 years ago

FROM php:7.2-fpm-alpine https://github.com/dbjpanda/drupal-on-docker/blob/fea3ead5414653985ef6bed3051d25e3777820ae/docker/php/Dockerfile#L1

And don't add unnecessary packages rather than required. E.g I don't think we will need git on server or on development side. https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements

ankitjain28may commented 6 years ago

We require git on php image as we are installing composer in this container and download dependencies using composer and composer use git clone to download some dependencies, i guess it is drush or drupal i am not sure, but composer needs git so i have installed git in that container.

Chiranjeeb2410 commented 6 years ago

@ankitjain28may what else needs to be done for this as of now?

ankitjain28may commented 6 years ago

@Chiranjeeb2410 Need to use alpine image and make all the necessary changes as per alpine image in installing the dependencies.

dbjpanda commented 6 years ago

@ankitjain28may Yes, Git is required as composer is downloading drupal core from git. Well aim is to minimize the size. Not to install/upgrade/update unnecessarily packages. If we want something else for project specific, then we have already dockerfile, just need to add a line.