Khalisaran Saran Khalisaran Saran - 2 months ago 4x
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 .


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