docker - Starting Multiple service in Dockefile -


i have 1 dockerfile below.

from centos:centos6 run yum install httpd* -y run yum install mysql* -y entrypoint service mysqld start && bash entrypoint service httpd start && bash 

docker file running successful when enter container 1 service in start start httpd.

i want start both service automatically using dockerfile.

please let know how that

you should create entrypoint.sh file:

#!/bin/bash     service mysqld start service httpd start 

and dockerfile:

from centos:centos6 run yum install httpd* -y run yum install mysql* -y copy ./entrypoint.sh / run chmod +x /entrypoint.sh entrypoint ["/entrypoint.sh"] 

you try use supervisord in docker image


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -