Assignent for Docker Day1

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

Q1. Explain What is Docker Container with image?

Docker container with image is an executable software package built on top of its own root file system. Every docker image will have its own docker container.


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

‘stop’ commands does graceful shutdown….where ‘kill’ command does a forceful kill. The status code will be different for both eventhough the status is same (Exited)

after stop command, exit code is 0

After kill command ,exit code is 137
  2  docker create --name kannan httpd
    3  docker ps -a
    4  docker start kannan
    5  docker stop kannan
    6  docker ps -a
    7  docker start kannan
    8  docker kill  kannan
    9  docker ps -a
   10  history


Q3. What is the difference between docker pause and docker unpause?

after pause command (docker pause kannan)

Using pause command we can suspend the container for some time and we can resume it later

After unpause(docker unpause kannan)
 11  docker start kannan
   12  docker pause kannan
   13  docker ps -a
   14  docker unpause kannan
   15  docker ps -a