You can use the following command to open the file system and volume of docker
# Explore File System.
Replace container-id/name with container id or name and run this command this will open you file system of docker for the container. to find out container id or detail use this cmd and copy the container id which you want to explore file systemdocker exec -t -i <container-id/name> /bin/bash
docker container ls
#Explore volume
You can use this command to explore the docker volume, to find out the available volume use this command .docker run -it --name admin -v <volume-name>:/var/lib/ ubuntu
Replace <volume-name> with volume name which you want to explore this will use Ubuntu file system or cmd to perform operation on this system. There is other way to explore file using this commanddocker volume ls
docker run --rm -i -v=<volume-name>:/tmp/myvolume busybox find /tmp/myvolume
Some of basic cmd can be used with in explore file system/volume
ls <list>
ls
or ls to list down all the files and folder
ls -l *
or to list down all the files with info like size of file etc. ls -l <filename> for single file
cd <change directory>
cd used to enter to a folder or direcory.cd <folder/dir name>
cd ..cd space dot dot. cd .. is used to return to previous dir/folder.
du -ma <filename>
To check size of file in mb , -ka to check in kb .
These are some basic Ubuntu command you can use when you are in file/volume system.
Comment down other cmd if you have.
Comments
Post a Comment