Docker compose start container on boot

I have a docker container, that i need to start on server boot.

The docker-compose.yml file i used to create this docker container is

With above docker-compose.yml file. i have to start docker container manually after server reboot.

To make it auto start, add the line

Here is the modified docker-compose.yml file.

You need to rebuild docker container based on this docker-compose.yml file

Change to the folder where your docker-compse.yml file is, in my case it was


Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *