Expose MariaDB port
2021-06-24 18:13:05
Nam Huynh
  • Visit: 7
  • Join Date: 2021-06-24
  • Last Login: 2021-06-25
  • My Point: 0
  • PartyLevel: No Party

Hi, I'm using docker image zentaopms:15.0.1, and I want to expose MariaDB port for external using. I've tried with this docker-compose file, and try to connect to port 3306, but not working


version: "3.8"

services:

  zentao:

    container_name: "zentao"

    image: "easysoft/zentao:15.0.1"

    restart: always

    volumes:

      - "./data/zentao:/www/zentaopms"

      - "./data/zentao-mysql:/var/lib/mysql"

    environment:

      MYSQL_ROOT_PASSWORD: "..."

      MYSQL_ROOT_HOST: "%"

    ports:

      - "80:80"

      - "3306:3306"


So how can I expose MariaDB port (3306) with docker?

2021-06-28 09:14:55
Fei Teng
  • Visit: 1918
  • Join Date: 2016-08-02
  • Last Login: 2021-11-08
  • My Point: 0
  • PartyLevel: No Party
This contianer image does not expose 3306 port. If you want to do this, you can create a dockerfile and base on 'easysoft/zentao:15.0.1' image, then you can use your yaml to create container and find it will work.
1/1