"Any port in a storm" is an idiomatic expression that is used to convey the idea that in situations that are particularly dire, accepting a solution that may not be ideal but at least provides some amount of respite and protection will do in the short-term. The origin of this particular English saying is not clear, although there is a popular notion that it has to do with seafaring vessels caught in storms seeking to find any type of port or shelter possible in which to ride out the worst of the storm. Over time, the usage of this term has come to mean settling for whatever solution is possible when the desired outcome is not available.
Typically, any port in a storm will imply that there is a need to settle for something less than the desired end. For example, if an individual has not eaten in several hours and feels the need to eat something now, he or she will look around at the food options immediately available. If his or her favorite foods cannot be obtained quickly, the individual may settle for something that is not a favorite, but will quench the hunger. In this instance, that less than desirable food serves as the any port in a storm that makes it possible to deal with the hunger, albeit not in the way that the hungry individual would prefer.
The use of any port in a storm can be applied to a number of situations. People who are lonesome may agree to go out with others they do not particularly like, simply to get out of the house and be around people. Going to a medical clinic after an injury because the primary care physician is not readily available is also an example of settling for something other than the desired medical attention. A job seeker may settle for one position as a way to earn a living when the desired job is not currently available.
It is important to note that making use of any port in a storm does not mean that a more attractive option will not present itself later on. In many instances, that temporary port serves as a way station to something better. Once a more attractive alternative is available, the individual can move on from that temporary safe haven and pursue the resolution that is highly likely to produce the greatest level of satisfaction.