The question is very simple, How to list containers that have ports 80 and 443 published?
have gone through docker documentation, but couldn't find much. - docker port containerID => this will show the port details for specific Container
use a combination of format
and filter
docker ps -a --format 'table {{ .Names }} \t {{ .Ports }}' --filter publish=443 --filter publish=80
or using expose
filter:
docker ps -a --format 'table {{ .Names }} \t {{ .Ports }}' --filter expose=443
get a range of posrts
:
docker ps --format 'table {{ .Names }} \t {{ .Ports }}' --filter expose=8000-8080/tcp
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.