phpmyadmin / docker

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

phpmyadmin/phpmyadmin:5.1.1-fpm docker image is not configured properly #333

Closed mmm4m5m closed 3 years ago

mmm4m5m commented 3 years ago

Describe the bug

Connection is closed when trying to load the page.

To Reproduce

Follow the installation steps: https://docs.phpmyadmin.net/en/latest/setup.html#using-docker-compose

Server configuration

docker image: phpmyadmin/phpmyadmin:5.1.1-fpm

Additional context

The apache image works fine: phpmyadmin/phpmyadmin:5.1.1 Fpm image listen on port 9000. Probably on ipv6 (or 127.0.0.1?). Quick changes in docker-compose and php-frm config files did not help.

williamdes commented 3 years ago

Hi @mmm4m5m Could you provide your docker-compose ?

mmm4m5m commented 3 years ago

hi @williamdes

Sorry for the late answer. I checked different options with FPM image without success. Currently I am using this docker-compose with not-FPM image. It works as expected with different options (for example with network host).

  phpmyadmin:
    image: phpmyadmin/phpmyadmin:5.1.1
    container_name: phpmyadmin-5.1.1
    volumes:
      - /sessions
      - ${PWD}/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php
      - ./phpmyadmin/theme/:/www/themes/theme/
    environment:
      PMA_ARBITRARY: 1
    ports:
      - 127.0.0.1:8888:80
    #network_mode: host
williamdes commented 3 years ago

Hi @mmm4m5m

I understand, so when you did configure phpmyadmin-fpm and the webserver did you correctly mount the volumes in the two ?

If you have some example of a non working config that will be a good starting point

Anyway, I keep this open and will get back to you with a working example ;)

mmm4m5m commented 3 years ago

@williamdes I just tried it Changed one line and it is not working: image: phpmyadmin/phpmyadmin:5.1.1-fpm

The connection was reset

williamdes commented 3 years ago

Can you give me the configuration you use for nginx or apache for example ?

Using fpm version you can not access by the browser without adding one more container as a webserver

mmm4m5m commented 3 years ago

@williamdes - the web server is inside the image. I use the image without any modifications. I do not understand you.

williamdes commented 3 years ago

@williamdes - the web server is inside the image. I use the image without any modifications. I do not understand you.

There is no webserver in a -fpm variant :)

mmm4m5m commented 3 years ago

@williamdes What do you mean? I assumed it is a "light" and smaller without apache. Something like: php -S 0.0.0.0:80

If there is no web server in -fpm image, then what is the purpose of that image and why it listen on port 9000. (Maybe it is not a question, if explanation is long, because I am not expert)

williamdes commented 3 years ago

@williamdes What do you mean? I assumed it is a "light" and smaller without apache. Something like: php -S 0.0.0.0:80

If there is no web server in -fpm image, then what is the purpose of that image and why it listen on port 9000. (Maybe it is not a question, if explanation is long, because I am not expert)

This is exactly what I mean, there is no webserver in a php fpm variant, it is meant to be used with another container It listens 9000 port as an fpm service

williamdes commented 3 years ago

Here is an example on how to use it: https://github.com/phpmyadmin/docker/issues/253#issuecomment-765368574

williamdes commented 3 years ago

Also I think you where searching for an alpine variant, right?

mmm4m5m commented 3 years ago

I see - the web server is separate (as you said). I guess apache image is better for me - separate/independent and more simple. I was looking for simple and minimal variant. (Not sure about apline, because my host OS is debian).

williamdes commented 3 years ago

I see - the web server is separate (as you said). I guess apache image is better for me - separate/independent and more simple. I was looking for simple and minimal variant. (Not sure about apline, because my host OS is debian).

You know with docker you can run quite a lot of linux OS, it uses your Kernel as base if I am not wrong Alpine Linux is a good way to reduce space usage, be sure to check it out ;)