Docker Stop Vs Docker Kill

DevOps

MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare
docker pull nginx
docker run --name akilan -d nginx
docker run --name akilan2 -d nginx
docker stop --time=30 akilan2
docker kill --time=30 akilan -------> Will not execute
docker kill akilan ------> Will execute

docker stop will accept the time in other words it’ll not force the process to stop. But the docker kill will force the running process to stop.

When we use the command docker stop on the stopped container, it will not throw any error. But if we try using the docker kill command on the stopped container it will throw an error.