Khalisaran Saran Khalisaran Saran - 1 year ago 83
Linux Question

how to start the container automatically when its stopped?--AWS

I have the docker container with jar file to run and i run the container by

sudo docker run --name xxx -d imagename

after the jar file was run successfully,then the container became inactive condition.

I want to restart the container automatically in amazon web service .

Answer Source

Have a look at the restart policies Docker provides. Maybe that is the solution for you? Docker Restart Policies

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download