Closed LY1806620741 closed 4 years ago
The image is based on Alpine, thus it doesn't include apt. However I realize that due to recent changes in the base image installation of pecl extensions is non-trivial.
The following steps appear to work for me (i.e. they compile the extension, I don't know whether it will actually work afterwards):
apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
pecl install mongodb
docker-php-ext-enable mongodb
apk del --no-network .phpize-deps-configure
Thanks, You fill in the void of my knowledge. But I find another problem is that After enter the host、user、pass、dbname , then adminer tell me "Database does not support password". Maybe something was wrong. I try to solve it by myself on freetime.
@LY1806620741 See this comment + the ones after that: https://github.com/TimWolla/docker-adminer/issues/16#issuecomment-417221957
I tried, but at last I gave up. I get adminer.php in the docker container. Finded line 1188 check password not null. Finded mongodb-driver-manager on https://www.php.net/manual/en/mongodb-driver-manager.construct.php. Then I think if I remove the check, maybe it can work. Before I put it into action, I found out https://sourceforge.net/p/adminer/bugs-and-features/635/, so i use Mongo Express now.
I use root exec container shell,
docker exec -it adminer -u root sh
andpecl install mongodb
then it say Cannot find autoconf. this image delete apt-get, how I install mongodb.so support.