- Docker is container management tool
- To save time (number of applications can run at a time)- To save cost (CPU, less RAM ,storage,operational cost will be less) - Improve software quality (quality coding,quality testing)
- Container is lightweight (minimal resources) application runtime environment without kernel
- Container is resources created by namespaces and together powered by kernel
docker will request kernel to create independent computational resources like network,PID,mount and username, those all resources combined and creates a runtime environment.
- When client request for docker image (if not available local,will be fetched from repo) and kernel will create user and will be assigned to computational resources like network,PID,mount and username
- Docker provides convenience scripts at get.docker.com.
- Step 1 – Download and Run the script.
- $ curl -fsSL get.docker.com -o get-docker.sh
- $ sudo sh get-docker.sh
- Step 2 – Enable Docker
- $ sudo systemctl enable docker
Step 3 – Start Docker
$ sudo systemctl start docker
Step 4 – Verify that docker is installed correctly by running the hello-world image.
$ sudo docker run hello-world
- docker engine,docker images,registry,container
- docker pause: Memory will be used but CPU allocations will be paused (no access to container)
- docker unpause: Memory will be used but CPU allocations will be re allocated ( access to container)
- this commands works with respect to accessing the resources
- docker stop : graceful stopping (first child process will be killed, later parent process will be killed)
- docker kill : forcefully kills the container ( Directly parent process will be killed )
- by using shell
- by using network
- PID1 has to run with anything (because no kernel in the container) which should not be excited.