Open geekyouth opened 8 months ago
method2:
services:
adminer:
image: adminer:4.8.1-standalone
# restart: unless-stopped
ports:
- "8080:8080"
environment:
TZ: Asia/Shanghai
ADMINER_DEFAULT_SERVER: mysql57
ADMINER_DESIGN: hydra
ADMINER_PLUGINS: 'tables-filter tinymce'
volumes:
- ./hydra.css:/var/www/html/designs/hydra/adminer.css:ro # fix hydra style
- ./demo/:/demo/:rw
- ./login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php
./login-password-less.php
<?php
require_once('plugins/login-password-less.php');
/** Set allowed password
* @param string result of password_hash
*/
return new AdminerLoginPasswordLess(
$password_hash = password_hash("admin", PASSWORD_DEFAULT)
);
now the sqlite is writeable with - ./demo/:/demo/:rw
this is my docker-compose.yaml
after run ,the error log as blow:
then as ablove guide,i mount file login-password-less.php :
now my docker-compose.yaml like this ( onle add a line
- ./login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php
):after run
docker compose down -v; docker compose up -d
, i recived the same error:then i add
/var/www/html/plugins-enabled/sqlite.php
file https://github.com/TimWolla/docker-adminer/issues/78 :and mount with docker-compose.yaml as blow
after run docker compose up -d;
it works:
but it is readonly