Expose MariaDB port
2021-06-24 18:13:05
Nam Huynh
  • Visit: 7
  • Join Date: 2021-06-24
  • Last Login: 2021-06-25

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: 1917
  • Join Date: 2016-08-02
  • Last Login: 2021-09-14
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