Assignment for docker day1

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

2. What is the difference between docker stop and docker kill?

Docker stop / kill commands are used to stop the running docker container.

After docker stop <name>,

“docker ps -a ” will show the status as Exited (0)

But after docker kill <name>,

“docker ps -a ” will show the status as Exited (137).
ie, docker stop sends SIGTERM as process end signal and SIGKILL is send by docker kill.


root@ip-172-31-28-155:/home/ubuntu# docker start abhi
abhi
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep abhi
2d0eb09c5f08 httpd “httpd-foreground” 18 minutes ago Up 7 seconds 80/tcp abhi

root@ip-172-31-28-155:/home/ubuntu# docker stop abhi
abhi
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep abhi
2d0eb09c5f08 httpd “httpd-foreground” 18 minutes ago Exited (0) 4 seconds ago abhi

root@ip-172-31-28-155:/home/ubuntu# docker start abhi
abhi
root@ip-172-31-28-155:/home/ubuntu# docker kill abhi
abhi
root@ip-172-31-28-155:/home/ubuntu# docker ps -a | grep abhi
2d0eb09c5f08 httpd “httpd-foreground” 18 minutes ago Exited (137) 2 seconds ago abhi

root@ip-172-31-28-155:/home/ubuntu#