For the general-purpose network, I can just have MacOS accept an IP address from the DHCP server. However, for the container network, I prefer assigning a static IP address. Is this possible? It certainly is. With the help of MacOS Network Locations, you can assign specific configurations for specific networks (or locations) and even define a particular network you want to connect to within a location. Let me show you how it works. Also: How to manage SSH connections on MacOS with Termius 

How to create different network locations in MacOS 

Requirements

The only thing you’ll need is a device running an updated version of MacOS. This feature works with both wired and wireless connections. Once you’ve configured the location exactly how you need it, click Apply to save everything.

Switching to a different Network Location

After you’ve created all of the network locations you need, MacOS makes it very easy to switch between them. All you have to do is click the Apple menu > Location > [Location name] (select the name of the location you want to use). And that’s all there is to creating and using network locations in MacOS. If you need to get specific with how your MacOS device interacts with a network, this is a great way to go. Just remember, however, if you move from the current location, you’ll want to select another. For example, if you have one location for home and one for work, your machine might have trouble connecting to that work LAN with the home settings. Fortunately, you are now empowered to more easily make that switch.