• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Interacting with docker via command line

Marco T.

New Pleskian
Hello,

how am I supposed to interact with docker from the command line? I tried to do a simple "docker ps" but the result was:

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

Thanks.
 
PS: I would need also help for managing network access. It seems that the docker containers cannot resolve any DNS query.
 
Hello,

I'm running as the default ubuntu user in Ubuntu 16.04. The result is this:
Code:
ubuntu@dev:/home$ service docker status                                                 
● docker.service - Docker Application Container Engine                                 
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-01-13 16:33:38 CET; 4 days ago               
     Docs: https://docs.docker.com                                                     
 Main PID: 5129 (dockerd)                                                               
    Tasks: 74                                                                           
   Memory: 35.2M                                                                       
      CPU: 8min 49.537s                                                                 
   CGroup: /system.slice/docker.service
...
 
As the service is obviously running, most likely cause for the issue that you have described is, that your user account does not have root privileges. To run "docker ps" you must either have root privileges or use the "sudo" prefix command for temporary root permissions. Alternatively you can add your user to the docker group on your system, like "sudo usermod -aG docker $(whoami)".
 
Wow, I actually forgot to use "sudo". It works fine using it. Could you please also tell me how to get the containers connected to the internet?
 
Well, the containers are actually "always on" (when they are running), but if you have set "automatic port mapping", they might use different ports each time they are running (if they need ports at all). What you will need to do is to choose "manual port mapping", then set a port and then create a proxy rule from the "Docker Proxy Rules" icon of the corresponding subscription. This way you can tell the server to translate incoming requests on e.g. a standard port to the specific port of the Docker container you are using on that site. More information on that: https://docs.plesk.com/en-US/onyx/a...esk-administration/using-docker.75823/#o77139
 
Maybe I wasn't clear, I have no issues in using the containers, even via Docker Proxy Rules, but the containers themselves can't reach the internet or resolve DNS queries, like if their networking bridge is host-only.
 
Back
Top