docker-library/drupal

Include git?

Closed this issue · 3 comments

From my own usage, it seems like this Image does not include git by default, or at the very least does not add it to the PATH.

I tried running composer require drupal/next:1.0.x-dev earlier and I was shown this by the CLI

Yeah, that's unfortunately expected -- most users likely don't need git, and it adds a non-trivial amount of additional size to the image which then cannot be reclaimed by users who don't need/want it.

What I would suggest is putting both your composer require and installation of git into a short Dockerfile that's FROM drupal:xxx.

While most users might not need to actually use git themselves in their containers, composer quite obviously needs it and complains and errors if it's not there?

I honestly don't understand the reasoning behind not including it when you're already including composer, which will, since git isn't there, be unstable and thus may error out when you try to require modules?

What I would suggest is putting both your composer require and installation of git into a short Dockerfile that's FROM drupal:xxx.

This is what we do for farmOS (along with unzip): https://github.com/farmOS/farmOS/blob/af2393bfc51da42f01e619915603e974097716b0/docker/Dockerfile#L65