TimWolla / docker-adminer

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

Please add an Environment variable which will change the default WebUI port #152

Closed MekayelAnik closed 12 months ago

MekayelAnik commented 12 months ago

Please add an Environment variable which will change the default web port 8080 to a custom port for example 8888 For example: If there will be an Env Variable suppose WEB_UI_PORT and setting the variable to 8888 will make the WebUI load on port 8888, if not set then by default it will load on 8080.

Thanks a lot in advance. Love this image. Thanks for the hard work. Regards

TimWolla commented 12 months ago

You can publish arbitrary ports onto the container's 8080 and thus a container-specific config is not required:

https://docs.docker.com/network/#published-ports

MekayelAnik commented 12 months ago

What you have suggested is Port Mapping, which is only allowed in a Bridge type of network. If someone uses Macvlan (I use it) or IPvlan to give dedicated IP to their Container, the port mapping will not work as it is a feature of bridge type network not of vlan type network. Only internal change of Port can take place in vlan. This is why I am requesting an environment variable that will change the WebUI port internally at the start of the container. Can you PLEASE do this?

TimWolla commented 12 months ago

Feel free to specify a custom CMD if the default doesn't suit your requirements:

https://github.com/TimWolla/docker-adminer/blob/4f3e355425bffd35db7bc0487eb3166d94316578/4/Dockerfile#L62