I’m trying to look out for a way to start the docker container after the linux(centos7) machine is rebooted.
I followed the document where we can use --restart=always flag, but only using this doesn’t work.
On looking around, I saw people using systemd service to keep the docker running.
I am facing issues there also, and want to know if this is the right way?
I’m using Ubuntu 24.04 LTS and had same issue
This is how to auto start Docker Desktop at user login (You must configure your user to auto login) cd to ~/.config/autostart/
OR cd /home/username/.config/autostart
If you don’t have a folder named autostart then create one with that name using mkdir autostart.
Create a new file with the name “Docker-Desktop.desktop” nano Docker-Desktop.desktop
Add the following lines