Docker Commands
Docker Commands
and
to run that image use the command name (docker run -it -d imagename) then only
container is formed.
and -d means deatched mode i.e run container in background even i close the
terminal or
anything
the ps command to show the active process in our system (docker ps) ----to show the
containers
if there are any stopped containers they can be seen by adding the -a flag then
(docker ps -a)
to enter into a [container] we have the command named (docker exec -it containerid
bash)
-----------------------------------------------------------------------------------
------
(docker commit containerid newimagename) --> this creates a new image and
then run
the container
-----------------------------------------------------------------------------------
------
TO REMOVE ALL THE CONTAINERS AT A ONE TIME:
-----------------------------------------------------------------------------------
--------
to check whether our apache2 server is runnning or not use this command
if it is not running
-----------------------------------------------------------------------------------
-------
hub
82:80 =----- indicates that 82 port of our local system is communicating with
the port number 80 to the container
NOTE:- HERE we taken port as 80 ------ due to apache2 server communicate with port
no. 80
-----------------------------------------------------------------------------------
--------