Gentoo Archives: gentoo-user

From: Rod <Rod@×××××××.au>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Docker - Assigning IP to container
Date: Wed, 23 Sep 2015 02:35:48
Message-Id: 56020FF5.2010206@Rods.id.au
1 Hi list,
2
3 I have docker installed, and I have a running instance of MineOS
4 also running, but each time I start the instance (system restarts) it
5 makes its own IP address in the address space of my running system.
6
7 I am using '-b' to connect it to the bridge I already have running,
8 but instead of configuring its IP to be 192.168.3.130, its 3.4 or 3.5 or
9 one of the unallocated IP's on the 192.168.3.0/24 address range.
10
11 I can reboot my system, and docker restarts the container no
12 problems, automatically.
13
14 I followed a instruction that I should modify
15 /etc/network/interaces, but that has done nothing to get the IP of the
16 container to configure on startup :(
17
18 /etc# cat network/interfaces
19 # interfaces(5) file used by ifup(8) and ifdown(8)
20 # Include files from /etc/network/interfaces.d:
21 source-directory /etc/network/interfaces.d
22
23 auto eth0
24 iface eth0 inet static
25 address 192.168.3.130
26 netmask 255.255.255.0
27 gateway 192.168.3.1
28
29 Is there something I am missing, cause I would like the IP to lock
30 on to the address I want, not some random one it decides to start on.
31
32
33 --
34 ---
35
36 Regards,
37
38 Rod Smart