TimWolla / docker-adminer

Database management in a single PHP file
https://hub.docker.com/_/adminer/
157 stars 69 forks source link

Base php:7.4 not have mongodb plugin #68

Closed LY1806620741 closed 4 years ago

LY1806620741 commented 4 years ago

I use root exec container shell, docker exec -it adminer -u root sh and pecl install mongodb then it say Cannot find autoconf. this image delete apt-get, how I install mongodb.so support.

TimWolla commented 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
LY1806620741 commented 4 years ago

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.

TimWolla commented 4 years ago

@LY1806620741 See this comment + the ones after that: https://github.com/TimWolla/docker-adminer/issues/16#issuecomment-417221957

LY1806620741 commented 4 years ago

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.