docker-lamp icon indicating copy to clipboard operation
docker-lamp copied to clipboard

bind-address override not working if using docker-compose

Open bencivennil opened this issue 4 years ago • 1 comments

Hi all,

if I start a container using docker-compose the value of bind-address is not what I expect to be looking at the dockerfile

this is my docker-compose.yml

services:    
  web:
    build: ./<path-to-dockerfile>
    container_name: mycontainer

in the docker file I use the latest-1604-php5 tag

after starting the container (everything seems almost good) I start the bash into it and I log into mysql using

mysql -u root

if I run the query

show variables like '%bind%';

the value is 127.0.0.1 and 0.0.0.0 as I would expect it to be.

If I run che image using docker run

the value of the variable is 0.0.0.0

Am I missing something?

Thanks, Luca

bencivennil avatar Mar 16 '21 17:03 bencivennil

Hi @bencivennil, I would recommend trying with the newer images as the php5 images are no longer directly supported. Please try on a newer image and see if the issue still persists

Thanks, Matt

mattrayner avatar Sep 19 '21 21:09 mattrayner