'Using specified IP for outgoing container connections

I do have a simple Python Telegram Bot that i built into a container image. This Bot will launch script upon receiving messages from my chat that will connect to device at my home and do stuff automatically so that I do not have to connect via VPN to do them.
The bot use a specified account to login into the home devices I allow this user to connect only from specified source IP, I would like to give this container a specified IP and then allow it on the device and not let the container use the "general" host IP.

Is there any way to set an IP of connection going of from the container?

Many thanks in advance, Gianluca



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source