I installed and setup docker and nginx as proxy as root so cPanel users could load and run dockers on their accounts.
The ngnix was installed using WHM console and docker was installed with yum installer. I had to manually added a vhost file and edit it for each users who want to run docker on their account with using their domain name. I created a vhost using a user cPanel sub-domain and a port not in use for docker.
The first test I did was to log in as a cPanel and open terminal then execute a docker with the port number that was assigned in vhost file to the sub-domain. It worked great so far.
My question is .. How do cPanel user (not root or su) execute an application like docker but leave it running in background even if they log out of cPanel.
I thought of using cron job to execute the script with docker commands but will cPanel cron job re-execute an script if the server reboots or restarted?
Is there another way for cPanel to set up scripts to be run all time in background that only need to be executed once like docker or re-execute if needed after a reboot?
Thank you,
Bill
The ngnix was installed using WHM console and docker was installed with yum installer. I had to manually added a vhost file and edit it for each users who want to run docker on their account with using their domain name. I created a vhost using a user cPanel sub-domain and a port not in use for docker.
The first test I did was to log in as a cPanel and open terminal then execute a docker with the port number that was assigned in vhost file to the sub-domain. It worked great so far.
My question is .. How do cPanel user (not root or su) execute an application like docker but leave it running in background even if they log out of cPanel.
I thought of using cron job to execute the script with docker commands but will cPanel cron job re-execute an script if the server reboots or restarted?
Is there another way for cPanel to set up scripts to be run all time in background that only need to be executed once like docker or re-execute if needed after a reboot?
Thank you,
Bill