Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADMINER_PLUGINS not working #1

Closed
Denitz opened this issue May 2, 2024 · 7 comments
Closed

ADMINER_PLUGINS not working #1

Denitz opened this issue May 2, 2024 · 7 comments

Comments

@Denitz
Copy link

Denitz commented May 2, 2024

        environment:
            ADMINER_PLUGINS: tables-filter enum-option

See error in container log:
2024-05-02 11:07:06 /entrypoint.sh: line 14: can't create plugins-enabled/001-tables-filter.php: nonexistent directory

@shyim shyim closed this as completed in 377402c May 9, 2024
@shyim
Copy link
Owner

shyim commented May 9, 2024

is fixed and the image has been updated :)

@Denitz
Copy link
Author

Denitz commented May 13, 2024

Sorry, but I still see
2024-05-13 08:00:29 /entrypoint.sh: line 16: can't create /var/www/html/plugins-enabled/001-tables-filter.php: Permission denied

@shyim
Copy link
Owner

shyim commented May 13, 2024

can you post the full compose description?

@shyim shyim reopened this May 13, 2024
@Denitz
Copy link
Author

Denitz commented May 13, 2024

Please see below. Note that I have custom plugins mapped, but even if I remove them, I still get the same error.
Ubuntu 22 via WSL2 for Win11.

    adminer:
        container_name: adminer
        image: shyim/adminerevo:latest
        restart: unless-stopped
        networks:
            - app
        environment:
            # Native plugins list
            ADMINER_PLUGINS: tables-filter enum-option
        volumes:
            - ./config/adminer/plugins-enabled/login-servers.php:/var/www/html/plugins-enabled/login-servers.php
            - ./config/adminer/plugins-enabled/myScroll.php:/var/www/html/plugins-enabled/myScroll.php
            - ./config/adminer/plugins-enabled/stickyColumns.php:/var/www/html/plugins-enabled/stickyColumns.php

            - ./config/adminer/adminer.css:/var/www/html/adminer.css

@Denitz
Copy link
Author

Denitz commented May 23, 2024

@shyim More details:

If I map /var/www/html/plugins-enabled folder via volumes, or a single /var/www/html/plugins-enabled/xx.php file, the mapped /var/www/html/plugins-enabled folder is created by Docker daemon and has 1000:1000 ownership with drwxr-xr-x permissions.

Next, your entrypoint tries to create this folder (if it doesn't exists, it's created with nonroot:nonroot ownership with drwxr-xr-x ):

mkdir -p /var/www/html/plugins-enabled || true

But the folder was already created by docker before (when the volumes were mapped) and next, once the plugins are copied, it's not writable by entrypoint script.

Maybe add smth like this after mkdir ...?

chown -R nonroot:nonroot /var/www/html/plugins-enabled

adding user: nonroot:nonroot in docker compose service doesn't help, plugins enabled is still auto-created.

Otherwise, mapping any file (plugin settings or a plugin) to plugins-enabled folder according to documentation fails.

@Denitz
Copy link
Author

Denitz commented May 29, 2024

@shyim Any news?

@shyim shyim closed this as completed in ba85ebd May 30, 2024
@shyim
Copy link
Owner

shyim commented May 30, 2024

I created a second path /var/www/html/plugins-custom it will be not touched by the entrypoint :)

You can place there you're custom plugins and still enable some with environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants