Mac can't connect to localhost for ros docker container

I’m trying to run tyrohs foxy ros image on a docker container.

It works fine launching it for the first time, but after I run docker stop container it doesn’t connect anymore to the localhost port. It still works in terminal, but doesn’t work with the novnc guy in the browser.

The command I ran to initialize it was docker create -it -p 6080:80 -v $(pwd):/home/ubuntu/Desktop/yondu_ros --name ros2_gazebo --volumes-from ros2_practice tiryoh/ros2-desktop-vnc:foxy

I’m not getting any errors except on the browser where it says “failed to connect to server”