Home > Operation and Maintenance > Docker > How to view files inside docker container

How to view files inside docker container

Release: 2020-04-02 10:42:11
Original
30064 people have browsed it

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...]
Copy after login

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...]
Copy after login

Example:

View the files in the /tmp directory (7a is the abbreviation of the container)

docker exec 7a ls /tmp
Copy after login

How to view files inside docker container

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template