Can I map multiple ports?

0115

Yes, you can map multiple ports when running a Docker container. This can be done using the -p option multiple times in the docker run command. For example:

docker run -p 8080:80 -p 3000:3000 my-container

In this example, port 80 of the container is mapped to port 8080 on the host, and port 3000 of the container is mapped to port 3000 on the host. This allows you to access multiple services running in the container from the host machine.

0 Comments

no data
Be the first to share your comment!