Home  >  Article  >  Operation and Maintenance  >  How does a native browser access the contents of a docker container

How does a native browser access the contents of a docker container

王林
王林Original
2020-04-15 10:15:276244browse

How does a native browser access the contents of a docker container

1. View the detailed information of the container

Command format:

docker inspect 容器名字或id

How does a native browser access the contents of a docker container

2. The corresponding port of the container Information to the host port, mapping relationship

How does a native browser access the contents of a docker container

3. Remember not to enter curl http://localhost:32768 here, but to switch to the host machine to enter the command.

How does a native browser access the contents of a docker container

#4. When starting, you can see the IP address of the host machine

How does a native browser access the contents of a docker container

5. Enter the host machine

How does a native browser access the contents of a docker container

6. Access the contents of the docker container

How does a native browser access the contents of a docker container

Recommended tutorial: docker tutorial

The above is the detailed content of How does a native browser access the contents of a docker container. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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