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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -