You can do that, You just have to bind your local port to the port on the container. Let's say you started the docker container with the following command,
docker run -it --rm -p 8080:8080 ubuntu
What this does is It starts the docker container binding your localport 8080 to port 8080 of the container.
Let's say you are running your app on port 8080 of the container, Then when you navigate to localhost:8080 on your local browser you would be effectively navigating to your app.