phpmyadmin / docker

Docker container for phpMyAdmin
https://hub.docker.com/_/phpmyadmin
GNU General Public License v3.0
665 stars 456 forks source link

Custom themes not working in 5.2 #379

Closed ToshY closed 2 years ago

ToshY commented 2 years ago

Problem

Since phpMyAdmin 5.2 it doesn't seem possible to mount volume for a custom themes anymore.

The documentation for docker examples in the main repo makes this even more confusing as mounting to /www/themes doesn't seem to have any effect, as where mounting to /var/www/html/themes worked for 5.1.

Reproduction

  1. Download a theme from themes repo, e.g. darkwolf.
  2. Mount theme directory to /www/themes
  pma:
    image: phpmyadmin:5.2
    security_opt:
      - no-new-privileges:true
    restart: always
    environment:
      DATABASE_ALLOW_NO_PASSWORD: 0
      PMA_HOST: ${DATABASE_HOST}
      PMA_PORT: ${DATABASE_PORT}
      HIDE_PHP_VERSION: 1
      PMA_ABSOLUTE_URI: "https://pma.example.local"
    networks:
      - proxy
    volumes:
      - pma_data:/sessions
      - ./docker/pma/themes/darkwolf:/www/themes/darkwolf
  1. Take a look at the homepage

image

Mounting to /var/www/html/themes doesn't show the new theme in 5.2 either.

williamdes commented 2 years ago

Hi, Are you sure to have a 5.2 compatible theme? Can you check in docker/pma/themes/darkwolf/theme.json?

ToshY commented 2 years ago

Hey @williamdes 👋

Thanks for the quick response. Just noticed that the theme.json says versions 5.0 and 5.1. After manually adding 5.2 to it, I was able to use it in the dashboard, although it was indeed not quite compatible yet 🤦‍♂️

With that mystery solved, maybe it's still a good idea to update the docker documentation part for themes to change the mounting from /www/themes to /var/www/html/themes then?

Also, what is the actual difference between phpmyadmin/phpmyadmin and phpmyadmin images, as both are used seemingly interchangeable in the docker examples documentation here and here?

williamdes commented 2 years ago

Hey @williamdes 👋

Hey 👋🏻

Thanks for the quick response. Just noticed that the theme.json says versions 5.0 and 5.1. After manually adding 5.2 to it, I was able to use it in the dashboard, although it was indeed not quite compatible yet 🤦‍♂️

You can try the zip https://github.com/phpmyadmin/themes/issues/78 and provide feedback to the author :)

With that mystery solved, maybe it's still a good idea to update the docker documentation part for themes to change the mounting from /www/themes to /var/www/html/themes then?

Why, the documentation is wrong?

Also, what is the actual difference between phpmyadmin/phpmyadmin and phpmyadmin images, as both are used seemingly interchangeable in the docker examples documentation here and here?

Maybe you are talking about what I fixed yesterday: https://github.com/phpmyadmin/phpmyadmin/commit/8ef83c070ea611320ec8bcee4730e8ae501c690b

Edit: I need to fix this command line

Also I think you may want to read #363

ToshY commented 2 years ago

You can try the zip https://github.com/phpmyadmin/themes/issues/78 and provide feedback to the author :)

Good idea 👍

Why, the documentation is wrong?

In the Docker Examples section, the last example for adding themes shows the following

docker run --name phpmyadmin -d --link mysql_db_server:db -p 8080:80 -v /custom/phpmyadmin/theme/:/www/themes/theme/ phpmyadmin/phpmyadmin

which mounts to /www/themes/theme. So change it to /var/www/html/themes/theme then?

Also I think you may want to read https://github.com/phpmyadmin/docker/issues/363

Yes, that clears things up. Thanks.

williamdes commented 2 years ago

which mounts to /www/themes/theme. So change it to /var/www/html/themes/theme then?

Indeed, it seems like other users figured it out too (https://github.com/phpmyadmin/docker/issues/367#issuecomment-1140057009)

I pushed https://github.com/phpmyadmin/phpmyadmin/commit/7faf6a53ecd3ce5b47d484b717c9b153d970f678 to fix the documentation