docker ps is used to see which containers are currently running. If you want to check whether a container is running, what port it's mapped to, or what it's named, this is the command to reach for first.
dockerfile
# Show only running containers
docker ps
# Show all containers, including stopped ones
docker ps -a
# Show container IDs only
docker ps -qdocker ps only shows running containers. If you also want to see containers that ran and then stopped, add -a.
You should see
CONTAINER ID IMAGE COMMAND STATUS PORTS NAMES abc123def456 nginx "/docker-entrypoint..." Up 2 minutes 0.0.0.0:8080->80/tcp web-demoInfo
PORTS column showing 0.0.0.0:8080->80/tcp means host port 8080 is mapped to container port 80.