RobLoach / drush-docker

:whale: Docker Container to run Drush
http://registry.hub.docker.com/u/drush/drush
Other
19 stars 19 forks source link

Add Common Drupal PHP Extensions #22

Open RobLoach opened 8 years ago

RobLoach commented 8 years ago
pirog commented 8 years ago

@RobLoach checked off redis above to reflect completion of #25

achton commented 7 years ago

How about memcache as well?

WD memcache: You must enable the PHP memcache (recommended) or memcached extension to use memcache.inc.            [error]
WD memcache: Failed to connect to memcache server: memcached:11211                                                 [error]
pirog commented 7 years ago

@RobLoach it might be worth considering some solutions to the general case of this problem eg "how do i install an arbitrary php extension inside of a docker container" since im guessing we dont want to ship with ALL THE EXTENSIONS?

Could possibly consider docker build args and some fancy scripting to allow users to specify their own extensions in an ENVVAR or something.

Def not the easiest thing to solve with docker.

RobLoach commented 7 years ago

@pirog Great idea... The PHP container does have the helpful docker-php-ext-install script: https://hub.docker.com/_/php/

We could likely just tell people to RTFM. Installing ALL THE EXTENSIONS is undesirable, but it's good to have a common set. b54be33929739a4b7978a976b0dff6945494575de5b5e2e3f1c04a9d605e28a8

pirog commented 7 years ago

+1 on common set for sure and then a script that could loop around the ENV BUILD ARG specified extensions and do a docker-php-ext-install EXT && docker-php-ext-enable EXT.

I think an issue we might run into here is whether docker-php-ext-install is going to install the underlying libraries needed for the php extension to work eg apt-get install my-php-extension-needs-this-lib.

RTFM +1 always

RobLoach commented 7 years ago

What would be in EXT? memcache seems reasonable.

pirog commented 7 years ago

yeah presumably something like that.

i think the issue we are going to run into here with this approach is i dont think docker-php-ext-install is smart enough to install the OS level dependencies required eg its not going to run like apt-get install THE-MEMACHE-D -y which means we are going to end up with the needed php config, the needed php extension and bindings, but not the low level stuff that ultimately is going to matter.

so sadly the high level goal here might not be possible.

mosesliao commented 6 years ago

I just send a pull request for memcached to be installed into base-alpine

https://github.com/RobLoach/drush-docker/pull/53

mosesliao commented 6 years ago

@RobLoach can you please relook at the images? I pull down the new image but the errors still appear

mosesliao commented 6 years ago

ok I realised my mistake. should have use 8-alpine tag

finex commented 3 years ago

Hi, is there an official solution to the memcache problem? Do I need to create a custom Dockerfile from where I manually enable memcache module?

Thanks :-)