How to run docker-compose up -d at system start up?

To let the containers autostart at startup point, I tried to add the command:

cd directory_has_docker-compose.yml && docker-compose up -d in /etc/rc.local.

but then after I reboot the machine, the containers not work.

How run docker-compose up -d at system start up?

7 Answers
7

Leave a Comment