Can you explain what you mean by that? What else would you use than a Docker network? Port forward only makes sense when you are using a local Docker bridge network.
We usually need the following information to understand the issue:
-
What platform are you using? Windows, Linux or macOS? Which version of the operating systems? In case of Linux, which distribution?
-
How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.
-
On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:
docker info docker versionReview the output before sharing and remove confidential data if any appears (public IP for example)
dpkg -l 'docker*' | grep '^ii' snap list dockerWhen you share the outputs, always format your posts according to the following guide: How to format your forum posts
Some additional questions:
- How did you test the port? Why do you think it is not working?
- Have you checked container logs?
- Why do you assume it is a firewall issue? Can you access the port from the Docker host either using the host IP (if I understand it correctly, not) or container IP?