i'm using docker desktop and i already have some containers there. i want them to run on…
- User
i'm using docker desktop and i already have some containers there. i want them to run on startup because now i need to start them manually each time.
- Assistant
To ensure that your Docker containers start automatically on boot, you can use the
--restartpolicy option when you run your containers. This option allows you to specify different restart policies, such as always, unless-stopped, on-failure, etc. Here’s how you can set it up:-
Using the Restart Policy When Creating Containers: If you are creating a new container, you can use the flag with . For example:
-