Search code examples
linuxazureubuntudockerpercona

Can't connect Percona Docker image on Ubuntu 16.04 on Azure


I'm new to Azure, Docker and Percona. I have this Percona Docker image running on Ubuntu 16.04 hosted on Azure. Now I can SSH to the Ubuntu server, and can run few docker commands such as:

docker ps 

But I just don't know how do I connect to the database server locally as well as remotely. Do I need to open some ports? Have to run those commands in Docker console? Because simply firing MySQL commands on the Ubuntu command line just doesn't work.


Solution

  • Working with an Ubuntu VM in Azure doesn't really differ from working with it locally, except for networking.

    The question you are asking is too broad, but generally speaking to enable external connectivity to Azure VM you need:

    1. Public IP Attached to the VM or some routing to the VM
    2. Network Security Groups permitting the traffic to the VM (all the NSG in Azure traffic goes through)
    3. Firewall on the VM allowing said traffic
    4. Application on the VM listening to the traffic