How to enter the docker container

藏色散人
Release: 2020-03-13 13:11:36
Original
3735 people have browsed it

How to enter the docker container

How to enter the docker container?

First use the following command to view the container ID (CONTAINER ID):

docker ps -a

Then use the following command to enter container, you can use the bash command to browse the files in the container:

docker exec -it [CONTAINER ID] bash

Some images do not have the bash command, you can use the corresponding Shell, such as sh

docker exec -it [CONTAINER ID] sh

Recommended: "docker tutorial"

The above is the detailed content of How to enter the 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!