# How can I expose more than 1 port with Docker?

You can expose more than one port in a Docker container by using the `-p` option when starting the container. The `-p` option maps a port on the host machine to a port in the container. You can specify multiple port mappings by using multiple `-p` options.

Here's an example of how to expose two ports, port 80 and port 443:

```bash
docker run -d -p 80:80 -p 443:443 my-image
```

In this example, the `-p 80:80` option maps port 80 on the host machine to port 80 in the container, and the `-p 443:443` option maps port 443 on the host machine to port 443 in the container.

Note that when you expose multiple ports in a Docker container, the container must be configured to listen on those ports.

[ad-uptime]
