Docker run start services
I need nginx-openresty and redis in single docker container. I have written docker file its working fine. But thing i need to start my redis service after login into the docker bash to automate this I have written .sh file which contains instrutions like start and stop of redis server and nginx.
and .sh file is
cd /etc/redis-installation/utils echo -n | ./install_server.sh service redis_6379 stop cd / cp ./dump.rdb /var/lib/redis/6379/ service redis_6379 start openresty
My problem is that docker container start and exist when shell execution completed. How can stay the container keep running with nginx and redis in running state.
One Solution collect form web for “Docker run start services”
Try using docker-compose with a link between your app container and your redis container. I suggest using the official redis container