What is Docker?

Assignment

What is Docker?

Why Docker?

How docker Works?

Container Lifecycle

10 basic commands of docker with their use case

What is docker run and docker exec

What is Docker?
--------------------
	AKA Docker engine
	container mgmt tool
	Go 
	by Soloman hykes
	Release
		comm
		enter
	by Docker
		

	tool
		save cost - save time - imp quality
		
		5 app in vm -----> 15 app in container
		
		5 mins 		----> 1 sec 
	
		-------------
			- GOOD CODE - Good test

	mgmt
		create - start - stop - restart - pause - unp - kill - remove
		-------------------------------------------------------------
	
	Container
		Lighweight APP run time env.

		1 user 1 net 1 pid 1 mnt 
		========================
			namespace
		============ container

	What are the res we need for running app?
	
	hardware -> OS
		  =============
		  Kernel --			NEED			CAN HAVE 	Limited to
				PID 		1			IN		1		
				USER		1			IN		IN
				MNT		1			IN		1
				NET		1			IN		1
	===========================================================================================
											PC
Code (CLASS) --> OBJECT(S) 

The kernel is a computer program at the core of a computer's operating system and generally has complete control over everything in the system.
	
File Systems ---
==========================================
BOOT FS --> ROOT FS --> uSER FS --> APP FS
ROM
Kernal	    
	=====================================
			MOUNT
==========================================================================================

Docker arch

YOU ----> Docker client --> Docker Daemon(server) -----> ContainerD ---> Kernel

===========================================================================

How to docker install it?
https://www.devopsschool.com/blog/how-to-install-docker-in-linux/


Docker components
======================================
docker engine

docker image
ROOT FS --> uSER FS --> APP FS
ubuntu      root	    ls - py - p - ja 

vm image -> 
BOOT FS --> ROOT FS --> uSER FS --> APP FS
kernel	    ubuntu      root	    ls - py - p - ja 

Docker Registry
		respository
			version of file systems
				ROOT FS --> uSER FS --> APP FS
Container

==============================================================
  1  clear
    2  ls
    3  docker images
    4  docker help
    5  clear
    6  ls
    7  docker pull httpd
    8  docker images
    9  docker create httpd
   10  docker ps -a
   11  docker start 1581199f8c78
   12  docker ps -a
   13  docker stop 1581199f8c78
   14  docker ps -a
   15  docker start 1581199f8c78
   16  docker ps -a
   17  docker restart 1581199f8c78
   18  docker ps -a
   19  docker pause 1581199f8c78
   20  docker ps -
   21  docker ps -a
   22  docker stats
   23  docker unpause 1581199f8c78
   24  docker stats
   25  docker stop 1581199f8c78
   26  docker ps -a
   27  docker start 1581199f8c78
   28  docker kill 1581199f8c78
   29  docker ps -a
   30  docker rm 1581199f8c78
   31  docker ps -a
   32  docker create httpd
   33  docker ps -a
   34  docker create httpd
   35  clear
   36  docker ps -a
   37  history

----------------------------
Docker Tutorials: Lifecycle of Docker Containers
RUN -------------------------------------- pull + create + start + Attached to container(PID1) RUN -d -------------------------------------- pull + create + start + DO NOT Attached to container(PID1) ----- Go inside using SHELL 37 history 38 clear 39 ps 40 ps -eaf | grep 10087 41 ps -eaf | grep 10086 42 ps -eaf | grep 10076 43 ps -eaf | grep 10075 44 ps -eaf | grep 10000 45 ps -eaf | grep 724 46 ps -eaf 47 clear 48 ps 49 docker run httpd 50 docker run -d httpd 51 clear 52 docker ps 53 docker ps -a 54 clear 55 docker ps 56 docker exec cff7246293b7 ls 57 docker exec cff7246293b7 git 58 git 59 devops 60 docker exec cff7246293b7 git 61 docker exec cff7246293b7 ls 62 docker exec cff7246293b7 /bin/bash 63 docker exec -it cff7246293b7 /bin/bash 64 clear 65 ls 66 history ------ access from outside using network docker run -d -p 80:80 httpd docker run -d -p 81:80 httpd docker run -d -p 82:80 httpd 67 clear 68 docker ps 69 docker inspect cff7246293b7 70 curl http://172.17.0.7 71 docker inspect cff7246293b7 72 clear 73 curl http://172.17.0.7 74 clear 75 docker ps 76 docker run -d -p 80:80 httpd 77 docker ps 78 docker run -d -p 81:80 httpd 79 docker ps 80 history How to create an image 3 docker run -itd ubuntu 4 docker ps 5 docker exec 426cfbde7418 git 6 docker exec 426cfbde7418 which apache2docker exec 426cfbde7418 which apache2 7 clear 8 docker ps 9 docker exec -it 426cfbde7418 /bin/bash 10 docker ps 11 docker commit -m"up-up-git-apa" -a"Rajesh Kumar" 426cfbde7418 up-up-git-apa 12 clear 13 docker images 14 docker run -itd up-up-git-apa latest f626fa2fbea9 5 seconds ago 253MB 15 clear 16 docker images 17 docker run -itd --name rah up-up-git-apa 18 docker exec rah git 19 docker exec rah which apache2
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

26 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Linus Shen
Linus Shen
8 months ago

What is Docker? A: A process or application for container running , and that is provide service to client
Why Docker? A: Docker is the first container runtime to be use
How docker Works? A: It provider image can running like process
Container Lifecycle A: container lifecycle is comprised of several states, such as created, running, paused, exited, and dead

10 basic commands of docker with their use case A: docker run , when i want to running container
docker restart , when i want to restart my container
docker build , when i want to build my own image
docker ps , when i want to show my running container
docker ps -a , when i want to show all my container
docker images , when i want to show my local image
docker logs , when i want to show my containers stdout logs
docker inspect , when i want to show my contaienrs information
docker network , when i want to show my docker networks
docker pause , when i want to stop my containers
What is docker run and docker exec A docker run is running my container , and docker exec is command into my container environment

_ _
_ _
8 months ago

## What is Docker?
Docker is a platform that enables creation and managing infrastructure efficiently by using containers.
## Why Docker?
more efficient usage of resources ( multiple copies of application can run on one vm instead of separate vms)
## How docker Works?
Creates separate containers using among other things c-groups and talking directly to kernel .
## Container Lifecycle
creation/running/(pausing)/stopping/removal
## 10 basic commands of docker with their use case
  docker run – This command is used to pull,start and attach to a new Docker container from an image.
  docker ps – This command is used to list all the running Docker containers.
  docker stop – This command is used to stop a running container.
  docker rm – This command is used to remove a Docker container.
  docker images – This command is used to list all the Docker images that are currently available on your system.
  docker pull – This command is used to download a Docker image from a registry.
  docker exec – This command is used to execute a command in a running container.
  docker version – This command is used to display current version of docker
  docker kill – This command is used to kill running container without properly stopping it.
   
## What is docker run and docker exec
docker run – This command is used to pull,start and attach to a new Docker container from an image.
docker exec – This command is used to execute a command in a running container

Kiran Kumar Vuyyuru
Kiran Kumar Vuyyuru
8 months ago

## What is Docker?

Docker is a software platform that allows you to build, test, and deploy applications quickly.

Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime.

## Why Docker?
Docker packages software into containers that have everything the software needs to run including libraries, system tools, code, and runtime.

## How docker Works?

Docker uses a client-server architecture. The Docker client talks to the Docker daemon.

## Container Lifecycle?

The lifecycle of a Docker container involves creation, running, stopping, and removal. Containers are created from Docker images, run as isolated instances, can be stopped or paused, and can be removed when no longer needed.

## 10 basic commands of docker with their use case

docker –version, docker pull, docker run, docker ps, docker ps -a, docker exec, docker stop, docker kill, docker commit, docker login, docker push, docker images, Docker network.

## What is docker run and docker exec

Docker run is the command you use to create a new container from an image.
Docker exec lets you run commands on an already running container!

jorge Sadao
jorge Sadao
8 months ago

Docker is container management tools
because It provides cost-effective alternative to VM
Architecture : docker client , docker daemon(server) , containerD – kernel
Lifecycle : created, running, paused,nopause,kill,rm
Docker Commands : Version , search, ps , stop , restart, kill , run ,
   docker run – start container from a image.
   docker ps – list all the running Docker containers.
   docker stop – stop a running container.
   docker rm –  remove a Docker container.
   docker images – list the Docker images that are currently available on your system.
   docker pull – download a Docker image from a registry.
   docker exec – execute a command in a running container.
   docker-compose – to manage multi-container Docker applications.
   docker version 
   docker kill – kill

 docker run – runs a command in a new container
 docker exec – runs a new command in a running container

Faisal
Faisal
8 months ago

1.A. It is tool to create containers which are virtual environments to run the application removing the duplicate of kernels required to run each application

2.A. Docker saves cost, time and improves quality by investing more time that is saved from environment deployment in coding and for good testing

3.A. We interact using docker engine which forwards the request to docker demons and then into containerD and Kernel.

4.A. create container, start container, stop container, remove container. We also have restart container, pause container, unpause container and kill container options available.

5.A. docker help, docker start, docker restart, docker pause, docker unpause, docker stop, docker kill, docker pull, docker create, docker rm, docker exec

6.A. docker run – It allows you to create a container from image and docker exec is used to execute the commands on existing containers

Silvia Acosta Oleta
Silvia Acosta Oleta
8 months ago

1) What is Docker?
Docker is a container managemet tool, save cost, time but is very import the quality 

2) Why Docker?
why portability, scalability, consistency, easy deploiment for deploying applications in different environments

 
3) How docker Works?
 docker engine, image, registry and container 

4) Container Lifecycle

creation, running, stoping and removal

5) 10 basic commands of docker with their use case
install, create, start, stop, kill, pause, stats, rm, logs, import, port

6) What is docker run and docker exec

docker run is a command you used to create a new container, and docker exec run commands on an running conteiner  

Jacek Szałęga
Jacek Szałęga
8 months ago

## What is Docker?
Docker is an open platform for developing, shipping, and running applications. It separates applications frominfrastructure.

## How docker Works?
## Why Docker?
Docker provides the ability to package and run an application in an isolated environment called a container. You can run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don’t need to rely on what’s installed on the host (eg it can contain different versions of needed libraries)
Docker in general is similar to Virtual Machines, except it’s much more lightweight. Instead of running an entire separate operating system (which is a massive overhead), Docker runs containers, which use the same host operating system.

## Container Lifecycle
## 10 basic commands of docker with their use case
Create : as name states, eg docker create –name ubuntu-container ubuntu
Start/Run: running container, eg docker run -itd –name ubuntu-container ubuntu
Pause: Optional state, where all container processess are paused, eg docker pause ubuntu-container
Unpause: all processes within the container that were previously paused are now resumed. eg docker unpause ubuntu-container
Stop: all processes within the container are halted/stopped, eg docker stop ubuntu-container
Restart: All processess within container are stopped then started , eg docker restart ubuntu-container
Destroy: remove container image from memory , eg docker rm ubuntu-container

other usefull commands for docker
docker exec -it ubuntu-container /bin/bash #run interactive bash session in already running docker container
docker ps -a # list all containers
docker pull imagename # pulls container image from docker repository
docker images # list all l;ocal docker containers images

## What is docker run and docker exec
docker run creates new running container instance , while docker exec allows to run process in already running container.
In other words, first command creates container, second one is usefull if need to interact with it.

shardendu
shardendu
8 months ago

## What is Docker?

Docker is a software that allows you to build, and run applications in containers. Containers are seprate environments that contain all of the binaries for deploying applications.

## Why Docker?

Docker package applications and their dependencies into containers. Containers are easy to share, run consistently on different systems, and simplify software development and deployment

## How docker Works?

Docker works by creating a light , seprate environment for running applications called container. A container is a software that holds everything like binaries,configuration DLLs etc. inside it which is required to run application by using undelying OS it creates perfect enviroment to run applications seperately

## Container Lifecycle

pull, create, run ,intereact with container stop restart remove

it can also be monitor, manage container and create image.

## 10 basic commands of docker with their use case

docker pull
docker images
docker ps
docker stats
docker start
docker stop
docker pause
docker restart
docker unpause
docker kill

## What is docker run and docker exec

docker run creates and start container based on image

docker exec command used to run a new command or start a new process within a running container

Alison Silva
Alison Silva
8 months ago

## What is Docker?
Its a container management tool

## Why Docker?
Save cost and time

## How docker Works?
Dockers application taks with docker daemon.
Docks uses resource isolation of OS kernal to run multiple containers.

## Container Lifecycle
It’s container stanges to report their existence.
Can be created, running, paused.. there are other ones that I dont remember.

## 10 basic commands of docker with their use case
create, restart, version, ps, stop, pause, start, rm, pull, kill

## What is docker run and docker exec
run -> creates a new container
exec -> execute commands

Victor Palomo
Victor Palomo
8 months ago

## What is Docker?

It’s a container that allows to virtualice a operating systems

## Why Docker?

Save time and costs

## How docker Works?

After install docker application it allows to install modules as DB, applications and we can manage as differet instances inside the same operating system

## Container Lifecycle

Create – start – stop – pause – remove

## 10 basic commands of docker with their use case

docker ps -a
docker pull
docker start
docker pause
docker kill
docker create
docker exec
docker version
docker history
docker run
docker stop

## What is docker run and docker exec

docker run: Used to create a container from a image
docker exec: We use it to run a command in a container

swati singh
swati singh
8 months ago

What is Docker?
-Docker is an engine. It helps package up an application and everything it needs to run, like settings, tools, into little box known as “container.”

Why Docker?
– it saves time, money and improves quality of work/products. Optimize usage of resources.

How Docker Works?
-Docker uses resource isolation in kernal to run multiple containers on same OS. It facilates multiple containers with same kernal/ resources.

Container Lifecycle
-create, start,kill, pause,unpause,restart, stop

What is docker run and docker exec
-docker run : allows user to create new containers using images.
-docker exec : allows user to run command inside running containers.

10 basic commands of docker with their use case
-docker run : allows user to create new containers using images.
-docker run -d: allows user to create new containers using images, in detached mode.
-docker start : starts container.
-docker exec : allows user to run command inside running containers.
-docker ps : lists running containers.
-docker images : lists available images inside OS.
-docker pull: downloads an image from the internet.
-docker stop: stops a running container.
-docker rm: removes a container.
-docker inspect : fetches the details of container.

Zbigniew Zysiak
Zbigniew Zysiak
8 months ago

Docker is a tool (engine) which allow to run and manage containers.

Using contrainers allow to save costs, save time and improve quality / HC of environment.

Docker engine hold images and provide possibility to deploy isolated boxes similar to virtual machine, but on higher level (without OS kernel). 

Create -> start, configure, manage -> pause/restart if needed -> Stop/Kill -> Delete

10 basic commands of docker with their use case:
-> docker pull httpd – get image
-> docker create httpd – create containers from image
-> docker start – start container
-> docker stop – stop container
-> docker restart – restart container
-> docker pause – pause container
-> docker stats – show container stats
-> docker unpause – resume container
-> docker kill – force stop container
-> docker exec – run application inside container

Docker run – reate and run a new container from an image
Docker exec – execute a command in a running container

Mariano Gazzola
Mariano Gazzola
8 months ago

# Assignment
## What is Docker?
It’s a platform for executing and managing containers
## Why Docker?
 
## How docker Works?
Docker uses the base operative system to isolate user spaces where to launch applications, you can create infinite of this isolated spaces with the limit of the available resources of hardware.
 
## Container Lifecycle
Create container based on a image
Run the container
Pause
resrtart
Stop
destroy
 
## 10 basic commands of docker with their use case
Run, exec, stop, ps, pull, images, ls, create, start, pause, unpause, kill, rm, restart
 
## What is docker run and docker exec
Docker starts a container, exec lets execute commands to the docker inside operative system

Kostiantyn Konstantinov
Kostiantyn Konstantinov
8 months ago

## What is Docker?
Docker is a tool that manages applications/software in packages called containers.

## Why Docker?
This is very useful because all packages/applications can be delivered in one package (image), very fast and without dependency problems.

## How docker Works?
Docker is something similar to virtualization, which allows you to install/start/stop the necessary software/apps using containers.

## Container Lifecycle
Created – running – paused – stopped – deleted
## 10 basic commands of docker with their use case
Docker images – list of images;
ps – list containers;
Pause – pause the processes of the container (CPU will not be used during “pause”);
Pull – get image from the repository;
Restart – restart container;
Rm – remove container;
Start – start container;
Stop – stop container;
Commit – create a new image;
Create – create a new container.

## What is docker run and docker exec
Docker run – works with a newly created container, exec – with already running one.

Dirk Willemans
Dirk Willemans
8 months ago

## What is Docker?
Container management tool. It is a tool to manage containers.
 
## Why Docker?
Better to say why containers because there are different container management tools on the marke , like the full opensource tool, podman. So why container, it is a more cost-effective alternative for virtual machines and better use of your resources.

## How docker Works?
Docker uses namespaces to provide you a isolated workplace (container).

## Container Lifecycle
pull container image
create (create your container)
start (start your container to use app running on container)
pause (if you need the cpu resources for other proceses)
stop (stop container if you no longer need app)
remove (remove your image when no loner needed)

## 10 basic commands of docker with their use case
docker –help (to see all the belw commands 🙂 )
docker ps (list containers)
docker images (list images)
docker inspect (show low level info)
docker rm (remove container)
docker rmi (remove container image)
docker pull (pull image from a docker registry)
docker create (create a container)
docker exec (run a command in a running container)
docker start (start a container)
docker start (stop a container)
docker pause (pause all processes within one or more containers)

## What is docker run and docker exec
docker exec (run a command in a running container)
docker run (run a command in a new container)
-> it will pull image, create container and start container)
 

Ankur Malik
Ankur Malik
8 months ago

## What is Docker?
Docker is a container management tool running on OS-level it having enterprise edition and also have community version, The software that hosts the containers is called Docker Engine. 

## Why Docker?
Docker helps you to deliver the software quickly. Docker provides you the portability, consistency, and scalability for deploying applications in different environments. Docker containers are lightweight, isolated, and easy to deploy. Using Docker we can ship code faster, standardize application operations, seamlessly move code, and save money by improving resource utilization. 

## How docker Works?
Docker uses a technology called namespaces to provide the isolated workspace called the container.  Docker uses resource isolation in the OS kernel to run multiple containers on the same OS.  This is different from the virtual machines (VMs), which encapsulate an entire OS with executable code on top of an abstracted layer of physical hardware resources.

## Container Lifecycle
The lifecycle of a Docker container involves creation, running, stopping, and removal.

## 10 basic commands of docker with their use case
1. docker — — version => This command is used to get the currently installed version of docker.
2. docker pull image name => This command is used to pull images from the docker repository(hub.docker.com).
3. docker run -it -d image name => This command is used to create a container from an image.
4. docker ps => This command is used to list the running containers.
5. docker ps -a => This command is used to show all the running and exited containers.
6. docker exec -it container id bash => This command is used to access the running container
7. docker stop container id => This command stops a running container
8. docker images => This command lists all the locally stored docker images.
9. docker rm container id => This command is used to delete a stopped container.
10. docker commit container id username/imagename => This command creates a new image of an edited container on the local system

## What is docker run and docker exec

docker run -it -d image name => This command is used to create a container from an image.
docker exec -it container id bash => This command is used to access the running container

Danny Rubiano
Danny Rubiano
8 months ago

Q1: What is Docker?
A1: Is a portability technology to develop an run application as container

Q2: Why Docker?
A2:
Portability: Easy to deploy onPremise or any Cloud Provider
Reproducibility: Easy to build and run containerized apps
Efficiency: Run more containers/apps with same resources of a VM

Q3: How docker Works?
A3:
Sharing the underlying host operating system kernel, but isolating the application’s filesystem, network, and other resources.

Q4: Container Lifecycle
A4:
Build -> Push -> Pull -> Run -> Stop -> Remove

Q5: 10 basic commands of docker with their use case
A5:
$ docker ps
$ docker images
$ docker exec
$ docker create
$ docker run
$ docker pull
$ docker push
$ docker stop
$ docker kill
$ docker rm

Q6: What is docker run and docker exec
A6:
docker run is used to start container
docker exec is used to execute command into running container

Last edited 8 months ago by Danny Rubiano
Milan Schild
Milan Schild
8 months ago

## What is Docker?
Platform for managing containers
## Why Docker?
Fast+cheap+universal way how to manage and maintain the development and production of many things on one place.
## How docker Works?
it creates/manages more customized images and launch each as a process on one machine with kernel
## Container Lifecycle
create,run, pause, stop
## 10 basic commands of docker with their use case
version, pull, run, ps, exec, stop, restart, kill, commit, push
## What is docker run and docker exec
run is running a new container to perform the command, exec will perofrm the command in already existing and running container

Ville Kääriä
Ville Kääriä
8 months ago

## What is Docker?
Usually it means Docker Engine which is container management tool.

## Why Docker?
With docker we can run containers which are more lightweight runtime environment than running virtual machines. Containers shares host machine kernel, mounts and network. It also is a lot faster to start and stop (scale) containers than virtual machines.

## How docker Works?
With docker we can create images, provision and run containers. Image/container only needs wanted application and it dependencies and since container contains all dependencies we can run containers without needing to install any additional applications to host OS. Docker uses resource isolation with kernel so we can run multiple containers at the same time with one host OS.

## Container Lifecycle
create image
push image to registry # not needed if image is created on same machine as it will be run on
pull image from regisry # not needed if image is created on same machine as it will be run on
create container out of an image
start container
stop container
remove container
remove image

## 10 basic commands of docker with their use case
docker pull IMAGENAME # Pull image from registry to local machine
docker images # List available images
docker create IMAGENAME # Create container from image
docker ps -a # List all containers
docker start CONTAINERID # Start container 
docker stop CONTAINERID # Stop container
docker restart CONTAINERID # Restart container
docker exec CONTAINERID command # Executes command inside container
docker stats # Display containers resource usage statistics
docker rm CONTAINERID # Remove container

## What is docker run and docker exec
docker run IMAGENAME # pull + create + start + attached to container
docker run -d IMAGENAME # pull + create + start + detached container
docker exec CONTAINERID command # Executes command inside container
docker exec -it CONTAINERID command # -it executes command like /bin/bash inside container and keeps shell open (interactive)

Bert Smets
Bert Smets
8 months ago

What is Docker?
Docker is similar to virtual machines, but instead of running an entire operating system docker runs your application inside containers, which are more lightweight

Why Docker?
Single image, easy for version tracking and management
lightweight
fast to deploy multiple instances of an image

How docker Works?
?

Container Lifecycle

  • create 
  • start /restart
  • pause / unpause 
  • stop / kill
  • remove

10 basic commands of docker with their use case

  • docker pull xyz : pull/download image “xyz”
  • docker images : list images that have been pulled
  • docker create xyz : create container from image “xyz”
  • docker ps-a : list containers with their id, status, image, name
  • docker start/restart <id> : start/restart docker container with ID <id>
  • docker stop <id> : gracefully stop docker container with ID <id>
  • docker pause/unpause <id> : pause/unpause docker container with ID <id>
  • docker kill <id> : kill (force stop, not gracefully) docker container with ID <id>
  • docker rm <id> : remove docker container with ID <id>
  • docker run <id>
  • docker exec <id> <command>

What is docker run and docker exec

  • docker run pulls, creates and start, either attached or not attached (-d switch) to the container
  • docker exec runs a command inside the container
Adam
Adam
8 months ago

## What is Docker?
# Docker is an engine is a container management system where containers are instances of images published on either public or private repositories.

## Why Docker?
# Docker engine enables us to use very lightweight services, closed in their own environment. This makes developers to be able to distribute their applications more generally, without worring about the environemnt (hardware, os, userland). They just need to make sure their image has what it need to run the application, so it will run in every docker environemnt. 

## How docker Works?
# Docker engine uses containers based on minimal images. The point is to have the bare minimum for the purpose of the image. So for a service it is running a sort a framework which uses the host that is running the docker engine to be able to talk to the hardware through kernel functions. The image is not prepared for this on its own it needs the help of docker engine. This makes images very lightweight.

## Container Lifecycle
# you get the image which will be the base of the container
# create a container from the image
# start the container
# use it
# stop, restart when needed
# stop an delete when you no longer need it

## 10 basic commands of docker with their use case
# ps -a – see docker processes about containers and statuses (running, stopped, created, etc.)
# images – see downloaded images
# pull – download image from repository
# create – create a containr from given image
# start/stop/restart containers
# pause/unpause – pause processes running in a given container
# rm – delete container

## What is docker run and docker exec
# run – starting and attaching to container; if image is not in place this does all the dependency, like downloading the image(s), creating the container for it, then starting and attaching to it
# with exec you can run a command inside the container, like starting or stopping the service inside, or adding more software into the container

Sammi
Sammi
8 months ago

#What is Docker?
Docker is a free container platform, which we can create, run and management containers on the it(docker engine).

#Why Docker?
If you mean why use container, it’s because we can create application with run-time environment in a light and portable way. 
We can run many applications on one machine and keep isolated environment at same time.
Also, we can do CICD easier.
It help us save cost/time and improve app quality.

#How docker Works?
First we need to have a docker engine installed on server side.
Then we can use docker cli to interact with the docker daemon, such as create, run, delete containers.
Containers can be saved as images in a image registry, and we can also download images from docker hub and run as containers.
We can define the network setting and storage volumns for each container to use the machine resource.

#Container Lifecycle
1. create
2. run
3. execute(running state)
4. terminate
5. save as image

#10 basic commands of docker with their use case
docker help
docker ps
docker pull
docker start
docker stop
docker rm
docker kill
docker run
docker inspect
docker exec
docker commit
docker images

#What is docker run and docker exec
docker run: to create a new container based on the image.
docker exec: to run command or interact with a running container.

Daniel F Hernandez
Daniel F Hernandez
8 months ago

## What is Docker?
Is an open platform for developing and running applications. It’s a platform is separated applications and infrastructure.

## Why Docker?
You can deliver software quickly, reducing the delay between writing code and running it in production.

## How docker Works?
Docker run applications in an isolated environment called container. One host can run simultaneously multiples containers.

## Container Lifecycle
Creation, running, stopping and removal.

## 10 basic commands of docker with their use case
docker build   – Build an image from a Dockerfile
docker commit – Create a new image from a container’s changes
docker config – Manage Docker configs
docker container –   Manage containers
docker context – Manage contexts
docker create   – Create a new container
docker restart – Restart one or more containers
docker run – Run a command in a new container
docker start   – Start one or more stopped containers
docker stats   – Display a live stream of container(s) resource usage statistics
docker stop – Stop one or more running containers

## What is docker run and docker exec
docker exec – command to interact with running docker containers.
docker run – command to build an run containers.

Francisco Jose Montoya
Francisco Jose Montoya
8 months ago

What is Docker?
Docker is a solution to manage containers in an isolated and security way

Why Docker?
We can run many containers simultaneously. It Isolation grant us the posibility to run SW that is not installed on our systems so we can deliver solutions quickly.

How docker Works?
We have a docker client wich is the interface responsible to manage our containers, and it talks with the Docker Daemon which is responible to create, run and distribute the containers. Then we have the containerd that is a client layer that works between the docker solution and the kernel and its responible to work with the kernel calls, And finally we have the kernel who is the core component of the host operative system.

Container Lifecycle
Create
Start
Stop
Restart
Pause
Unpause
Kill
Remove

10 basic commands of docker with their use case

create.- docker create httpd ### to create a container with an http sw
ps.- docket ps ## to list the containers 
pull.- docker pull httpd ## to get an container image with httpd se
start.- docker start <container ID> ## To start running a container with its ID name
images.- docker images ## list all the images currently installed
help.- docker help ## display help with the use of the docker command
stop.- docker stop <container ID> ## stop container before killing it
pause.- docker pause <container ID> ## pause the execution of the container
exec.- docker exec <container ID> ## Run commands inside our container
stat.- docker stat <container ID> ## display information regarding the execution of the container

What is docker run and docker exec
the run command is used to run a command in a new container by pulling the image and starting the container
The exec command is used to run command inside of a container that is already running, and this could be interactive or not.

Arturo Alvarado Esparza
Arturo Alvarado Esparza
8 months ago

## ¿Qué es Docker?

Docker es una herramienta de gestión de contenedores, es una plataforma abierta diseñada para construir, compartir y ejecutar aplicaciones de contenedores

## ¿Por qué Docker?

Debido a que Docker permite un uso más eficiente de los recursos del sistema, ahorra costos y tiempo y mejora la calidad, la implementación rápida

## ¿Cómo funciona Docker?

Docker utiliza una arquitectura cliente-servidor. El cliente de Docker se comunica con el demonio de Docker, que realiza el trabajo pesado de crear, ejecutar y distribuir los contenedores de Docker. El cliente y el demonio de Docker pueden ejecutarse en el mismo sistema, o puede conectar un cliente de Docker a un daemon de Docker remoto.

## Ciclo de vida del contenedor

cación, funcionamiento, parada y extracción

## 10 comandos básicos de Docker con su caso de uso

docker version: este comando se utiliza para mostrar la versión de Docker instalada en el equipo.

docker run: el comando docker run crea un contenedor a partir de una imagen determinada e inicia el contenedor

docker images: este comando se utiliza para mostrar todas las imágenes instaladas actualmente en el sistema.

docker ps – ‘estado del proceso’ que muestra el estado de todos los procesos en ejecución junto con sus ID.

docker stop: el comando se usa para detener el contenedor en ejecución

docker rm – Este comando se utiliza para eliminar el contenedor docker

docker pull: este comando se utiliza para descargar una imagen de Docker de un registro.

docker exec: este comando se utiliza para ejecutar un comando en un contenedor en ejecución.

docker kill: elimina uno o más contenedores en ejecución

docker restart: reinicie uno o varios contenedores

## ¿Qué es docker run y docker exec?

docker run es el comando para crear un nuevo contenedor a partir de una imagen y docker exec le permite ejecutar commnads en un contenedor que ya se está ejecutando.

Vijay Pathania
Vijay Pathania
8 months ago

What is Docker?
Docker is a container management tool.

Why Docker?
Because it is helpful in in deploying applications in different environments.

How docker Works?
Once it is installed on linux machine.
Linux kernel has the funtionality of namespace and cgroups
which helps in creating multiple containers each running in different namespace and thus isolate from each other
Each container having its own cpu and ram

Container Lifecycle
Created
Running
Paused
Stopped
Deleted

10 basic commands of docker with their use case
docker ps -a -shows running container
docker pull imagename – pulls image from docker hub
docker inspect – it will give detail information of the container.
docker rmi -f image – it will remove the image
docker pause – will pause a running process in a container
docker unpause – will unpause a running process in a container.

What is docker run and docker exec
docker run is used to create a container from image.
docker exec is used to execute command inside the container.

26
0
Would love your thoughts, please comment.x
()
x