skip to Main Content

Can I install Docker over a server with pre-installed cPanel and CentOS 7? Since I am not aware of Docker, I am not completely sure whether it will mess with cPanel or not. I already have a server with CentOS 7 and cPanel configured. I want to know if I can install Docker over this configuration I mentioned without messing up?

3

Answers


  1. Yes you could, in fact someone else has done it already: https://github.com/mirhosting/cPanel-docker

    Login or Signup to reply.
  2. Yes you can install docker over cPanel/WHM just like installing it on any other CentOS server/virtual machine.

    Just follow these simple steps (as root):

    1) yum install -y yum-utils device-mapper-persistent-data lvm2 (these should be already installed...)
    2) yum-config-manager --add-repo    https://download.docker.com/linux/centos/docker-ce.repo
    3) yum install docker-ce
    4) enable docker at boot (systemctl enable docker)
    5) start docker service (systemctl start docker)
    

    The guide above is for CentOS 7.x. Don’t expect to find any references or options related to Docker in the WHM interface. You will be able to control docker via command line from a SSH shell.

    I have some docker containers already running on my cPanel/WHM server and I have no issues with them. I basically use them for caching, proxying and other similar stuff.

    And as long as you follow these instructions, you won’t mess-up any of your cPanel/WHM services/settings or current cPanel accounts/settings/sites/emails etc.

    Not sure why you haven’t tried this already!

    Login or Signup to reply.
  3. I’ve been doing research and working on getting Docker working on cPanel. It’s not just getting it to work on a CentOS 7 box but rather making it palatable for the cPanel crowd in the form of a plugin. So far I can confirm that it’s absolutely doable. Here’s what I’ve accomplished and how:

    1. Integrate Docker Compose with cPanel (which is somewhat a step
      further from WHM)
    2. Leverage the user-namespace kernel feature in Linux so Docker
      services can’t escalate their privileges (see userns remap)
    3. Leverage Docker Compose so users can build complex services and
      start ready apps from the store with a click
    4. Make sure services starting via Docker run on a non-public IP on the
      server. Everything gets routed via ProxyPass

    cPanel has been gracious to provide a Slack channel for people to discuss this upcoming plugin. I’d be more than happy to invite you if you’d like to be kept updated or to contribute. Let me know!

    FYI, there’s more info here on https://www.unixy.net/docker if you’re interested. Please note that this plugin is in private beta but more than happy to let people use it!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search