1

I have a simple docker container which runs just fine on my local machine. I was hoping to find an easy checklist how I could publish and run my docker container on cPanel any help , i used centos 7 server

(iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 127.0.0.1 --dport 80 -j DNAT --to-destination 172.17.0.2:8888 ! -i docker0: iptables: No chain/target/match by that name.

and port not be defined

Nader Medhet
  • 43
  • 1
  • 7
  • 1
    Possible duplicate of [Can I Install Docker Over cPanel?](https://stackoverflow.com/questions/46509830/can-i-install-docker-over-cpanel) – trebleCode Nov 14 '18 at 17:05

2 Answers2

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.

See references Here

0

Adding onto Tiago's comment Docker is now installed using docker.io not docker-ce So skip step 2 and modify step 3

James Claridge
  • 179
  • 1
  • 11