April-9th-2019, 07:23 PM
(This post was last modified: April-9th-2019, 07:28 PM by Armin@netPI.)
What do you mean exactly with "address manually"?
Do you mean the new implemented function to set those values across environment variables during container's start now?
And what do you mean with the standard one? In case you don't specify anything the container falls back to 192.168.253.1. Is it this address you mean as standard one?
The settings of what is configured is stored in the file /etc/network/interfaces.d/cifx0 dynamically during container's start. So in your case to make sure the file has the correct values use the embedded console of portainer.io web GUI to jump into the container and print out what's in the file.
The file is generated during the container's first start
Thx
Do you mean the new implemented function to set those values across environment variables during container's start now?
And what do you mean with the standard one? In case you don't specify anything the container falls back to 192.168.253.1. Is it this address you mean as standard one?
The settings of what is configured is stored in the file /etc/network/interfaces.d/cifx0 dynamically during container's start. So in your case to make sure the file has the correct values use the embedded console of portainer.io web GUI to jump into the container and print out what's in the file.
The file is generated during the container's first start
Code:
# create the corresponding Ethernet configuration file
if [ ! -f /etc/network/interfaces.d/cifx0 ]
then
touch /etc/network/interfaces.d/cifx0
echo "auto cifx0" >> /etc/network/interfaces.d/cifx0
if [ -z "$IP_ADDRESS" ]
then
echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
echo "address 192.168.253.1" >>/etc/network/interfaces.d/cifx0
echo "network 255.255.255.0" >>/etc/network/interfaces.d/cifx0
else
if [ "$IP_ADDRESS" == "dhcp" ]
then
echo "allow-hotplug cifx0" >> /etc/network/interfaces.d/cifx0
echo "iface cifx0 inet dhcp" >>/etc/network/interfaces.d/cifx0
else
echo "iface cifx0 inet static" >> /etc/network/interfaces.d/cifx0
echo "address" $IP_ADDRESS >>/etc/network/interfaces.d/cifx0
echo "network" $SUBNET_MASK >>/etc/network/interfaces.d/cifx0
echo "gateway" $GATEWAY >>/etc/network/interfaces.d/cifx0
fi
fi
fi
Thx
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)