TimWolla / docker-adminer

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

How to reference plugins in docker-compose? #123

Closed shimizurei closed 2 years ago

shimizurei commented 2 years ago

I am testing out adminer and I cannot get it to run when I add the plugin line. According to the logs, I get an exit code 255.

Compose File

version: '3.7'
services:
    adminer:
        image: 'adminer:latest'
        restart: always
        ports:
            - '8080:8080'
        environment:
            - 'ADMINER_DESIGN=dracula'
            - 'ADMINER_PLUGINS=plugin dump-json dump-zip login-password-less'

    mysql_db:
        image: 'mariadb:10.7'
        command: '--default-authentication-plugin=mysql_native_password'
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: rootpassword
methbkts commented 2 years ago

@shimizurei AFAIK you don't need to put plugin into ADMINER_PLUGINS env var also, you need to bind-mount login-password-less so your compose file should look like this

services:
  adminer:
    image: 'adminer:latest'
      restart: always
      ports:
        - '8080:8080'
      volumes:
        - ./plugins/login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php
      environment:
        - 'ADMINER_DESIGN=dracula'
        - 'ADMINER_PLUGINS=dump-json dump-zip'
shimizurei commented 2 years ago

Found the answer here.

Compose file (adminer section) ultimately looks like this:

services:
  adminer:
    image: 'adminer:latest'
      restart: always
      ports:
        - '8080:8080'
      volumes:
        - ./plugins/login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php
      environment:
        - 'ADMINER_DESIGN=dracula'
        - 'ADMINER_PLUGINS=dump-json dump-zip' # #### REMOVE any plugins in a bind mount from the list