How to expose multiple ports with Docker?

1 · Rahul Wagh · Sept. 16, 2021, midnight
Summary
When we package any application using Docker then either we create Dockerfile or docker-compose.yaml, even you can create both the files and share the files with others. There is one important aspect in both the files .i.e. PORT. Any container which you build and ship to other developers has to have one or more defined PORT on which it can run and expose the services. As a rule of thumb, there should be at least one PORT defined inside either Dockerfile or docker-compose....