connecting to a docker-compose mysql container denies access but docker running same image does not

前端 未结 7 512
情歌与酒
情歌与酒 2020-12-01 05:26

I am having some issues connecting to the mysql docker container that I have launched with docker-compose. This is a long post (sorry!).

Here is my docker-compose.ym

7条回答
  •  清歌不尽
    2020-12-01 05:40

    It looks like your problem is solved. I thought I'd discuss my problems similar to this.

    I am running tomcat (web) and mysql (db) using docker-compose on a Synology NAS (DSM 6.0.2). It worked fine on an Ubuntu box I have but not on the NAS.

    The problem was the firewall on the NAS - I had modified my firewall rules to allow certain ports open but then DENY ALL at end. When I added :3306 to the allowed ports it worked!

    This is not a good solution and I don't know why DSM would require this since the docker-compose is running on a BRIDGE network. I've put in a support ticket about this.

    This answer may help others with this blocked container issue.

提交回复
热议问题