comanage-dev - Re: [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?
Subject: COmanage Developers List
List archive
- From: Scott Koranda <>
- To: Tom Zeller <>
- Cc:
- Subject: Re: [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?
- Date: Tue, 13 Jun 2017 08:18:49 -0500
- Ironport-phdr: 9a23:tZTnExamMOmpPVzD40hwwmf/LSx+4OfEezUN459isYplN5qZr8W5bnLW6fgltlLVR4KTs6sC0LuJ9f+7EjJbqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjSwbLdwIRmsrwjcuMYajIpsJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlTwKPCAl/m7JlsNwjbpboBO/qBx5347Ue5yeOP5ncq/AYd8WWW9NU8BMXCJDH4y8dZMCD/EPM+hYsYfzulgArRWxCgawGezgyDFHi2Tq3aEmyektDR3K0RY+E98IrX/arM/1NKAXUe2t0afH0TLDb+9K2Tzg7YbIdQohruuKXb1ta8Xa1E4iFxjGjlWXs4zqJTWV2fkXvGWA9OpgTeKvhHA9qwFwvjeg3MMshZXOhoMbxVDE7yJ5wJstJdGiVEF7ZtukHYJWuiqHNIV2WtsvT39ptSomyLALvJC7cSsRx5g7whPSZOCLf5SV7R/mSOmdPSp3iXdgdb6hiRu//1Csx+/8W8Wu01tHrzBJnsTDu3wTzRDf99aLRud780y8wziAzRrT5ftBIU0slarUNZohwrkom5oWq0vDHyv2lFzvjK+Kakko4+ep5/rpb7jovJOcOIh0igbxMqQqhMOzG/g3Mg8LX2SD+OS80qPs/VHhTblUj/A6jqvUvZXUJckYvaG1HwpY34k/5xqjEjir1cgXkWUaI19AfR+LkYbkNl/WLPD9F/i/glCskDlxx/DBO73sGo7NLnvEkLf7Z7l97VNTxxAowNBQ4pJbELABIPbpVkDts9zYCwc1MxaozOb/FNV9yoQeVHqTDa+eNaPdq1mI6fggI+aSfYMapSjyK+Y+6v7qjH85gkMdfbK30ZcNaXC4GOhmLFuDYXrqnNgBDXkGshAgQ+P3lV3RGQJUMkq1WuoO6zU/BZjuWZvRS4Spjaapxz+7E4dXbWlCAVeTHm3vap3CUPAJPnG8OMhkxwcPUqS9A6wmzxiouAayn6FkKfDd/CERnYn71NVv5ubakRo16jNuCNmFlWqKSjcnzSszWzYq0fUn8gRGwVCZ3P092qQAGA==
Hi,
> Maybe an easy question : I'm using comanage-registry-mariadb and I'd
> like to connect using a non-Docker app (PhpStorm), do you know if
> that's possible ?
It should be possible.
> I tried connecting to localhost/127.0.0.1:3306 and 192.168.0.1:3306
> (as that is the IP shown in 'docker network inspect
> comanage-registry-internal-network'), but no luck.
You need to expose the port outside of the container.
For example, if you are just using 'docker run' then you might do
docker run -d --name comanage-registry-database \
--network comanage-registry-internal-network \
-v /docker/var/lib/mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=XXXXXXXX \
-e MYSQL_DATABASE=registry \
-e MYSQL_USER=registry_user \
-e MYSQL_PASSWORD=xxxxxxxx \
-p 3306:3306 \
mariadb
You should then find that port 3306 on localhost is "connected to" port 3306
inside the container.
If you are using a compose file then you want something like this in it:
comanage-registry-database:
image: comanage-registry-mariadb
volumes:
- /docker/var/lib/mysql:/var/lib/mysql
- /docker/run/secrets:/run/secrets
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
- MYSQL_DATABASE=registry
- MYSQL_USER=registry_user
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_registry_user_password
secrets:
- mysql_root_password
- mysql_registry_user_password
networks:
- default
ports:
- "3306:3306"
deploy:
replicas: 1
Thanks,
Scott
- [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?, Tom Zeller, 06/12/2017
- Re: [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?, Scott Koranda, 06/13/2017
- Re: [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?, Tom Zeller, 06/29/2017
- Re: [comanage-dev] How to expose 3306 in comanage-registry-mariadb ?, Scott Koranda, 06/13/2017
Archive powered by MHonArc 2.6.19.