Docker Volume:
docker volume inspect volume1:
=>If you want some data(files/folders from container even after terminating container.
=> This one will possible if you create docker volumes .
To stop container:
-----------------------
ubuntu@ip-172-31-2-125:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9bd18e36fd32 alpine "/bin/sh" 11 seconds ago Up 11 seconds cont19
ubuntu@ip-172-31-2-125:~$ docker stop cont19
cont19
ubuntu@ip-172-31-2-125:~$
To start :
-----------
ubuntu@ip-172-31-2-125:~$ docker start cont19
cont19
ubuntu@ip-172-31-2-125:~$
To enter into inside a container:
-----------------------------------------
ubuntu@ip-172-31-2-125:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9bd18e36fd32 alpine "/bin/sh" 8 minutes ago Up 35 seconds cont19
ubuntu@ip-172-31-2-125:~$ docker exec -ti cont19 /bin/sh
/ #
=>If you want some data(files/folders from container even after terminating container.
=> This one will possible if you create docker volumes .
To stop container:
-----------------------
ubuntu@ip-172-31-2-125:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9bd18e36fd32 alpine "/bin/sh" 11 seconds ago Up 11 seconds cont19
ubuntu@ip-172-31-2-125:~$ docker stop cont19
cont19
ubuntu@ip-172-31-2-125:~$
To start :
-----------
ubuntu@ip-172-31-2-125:~$ docker start cont19
cont19
ubuntu@ip-172-31-2-125:~$
To enter into inside a container:
-----------------------------------------
ubuntu@ip-172-31-2-125:~$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9bd18e36fd32 alpine "/bin/sh" 8 minutes ago Up 35 seconds cont19
ubuntu@ip-172-31-2-125:~$ docker exec -ti cont19 /bin/sh
/ #
Comments
Post a Comment