Home >Operation and Maintenance >Docker >How to view files inside docker container
You can use the docker exec ls command to view the files in the docker container.
docker exec: Execute the command in the running container
Syntax
docker exec [OPTIONS] CONTAINER COMMAND [ARG...]
ls command is used to display the contents of the specified working directory (list the current working directory files and subdirectories included).
Syntax
ls [-alrtAFR] [name...]
Example:
View the files in the /tmp directory (7a is the abbreviation of the container)
docker exec 7a ls /tmp
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of How to view files inside docker container. For more information, please follow other related articles on the PHP Chinese website!