<p>It is part of the basic concept of Docker that Docker assigns an IP address for you to the container.</p>

<p>But maybe this isn't what you are asking?</p>

<p>From what I can see on your screenshot, you have certain port mappings active, as listed under "PORTS". You should be able to access those ports under the IP of your Docker host as Docker will expose those port for you.</p>

<p>In other words: More often than not, you don't care about your container's IP address at all.</p>

CC BY-SA 4.0
2018-05-26T11:41:30.920Z
2018-05-26T11:41:30.920Z
TorstenS
<p>How to setting docker container ip?</p>

<pre><code>root@instance-1:~# lightning-cli getinfo
{
  "id": "0230c8826852e2a39883f36233483419e9c139b644c696b8dbcca38fef7303ee95", 
  "port": 9735, 
  "address": [
  ], 
  "binding": [
    {
      "type": "ipv6", 
      "address": "::", 
      "port": 9735
    }
  ], 
  "version": "v0.5.2-2016-11-21-2725-gb79bb1d", 
  "blockheight": 524318, 
  "network": "bitcoin"
}
root@instance-1:~# docker ps -a
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                                                
       NAMES
59424f02b9e2        cdecker/lightningd:latest   "/usr/bin/lightningd…"   11 minutes ago      Up 11 minutes                                                                            
       lightning
6d4c7fb6d3e2        dougvk/bitcoind:latest      "/entrypoint.sh bitc…"   23 hours ago        Up 23 hours         0.0.0.0:8333-&gt;8333/tcp, 8332/tcp, 18332-18333/tcp, 0.0.0.0:9735-&gt;9735
/tcp   bitcoind_mainnet
</code></pre>

<p><a href="https://i.sstatic.net/91USh.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/91USh.jpg" alt="enter image description here"></a></p>

<lightning-network>
docker container ip setting
bora demiroglu
# docker container ip setting

(Asked by: username_0 on 2018-05-25)

How to setting docker container ip?

```
root@instance-1:~# lightning-cli getinfo
{
  "id": "0230c8826852e2a39883f36233483419e9c139b644c696b8dbcca38fef7303ee95", 
  "port": 9735, 
  "address": [
  ], 
  "binding": [
    {
      "type": "ipv6", 
      "address": "::", 
      "port": 9735
    }
  ], 
  "version": "v0.5.2-2016-11-21-2725-gb79bb1d", 
  "blockheight": 524318, 
  "network": "bitcoin"
}
root@instance-1:~# docker ps -a
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                                                
       NAMES
59424f02b9e2        cdecker/lightningd:latest   "/usr/bin/lightningd…"   11 minutes ago      Up 11 minutes                                                                            
       lightning
6d4c7fb6d3e2        dougvk/bitcoind:latest      "/entrypoint.sh bitc…"   23 hours ago        Up 23 hours         0.0.0.0:8333->8333/tcp, 8332/tcp, 18332-18333/tcp, 0.0.0.0:9735->9735
/tcp   bitcoind_mainnet

```

[![enter image description here](https://i.sstatic.net/91USh.jpg)](https://i.sstatic.net/91USh.jpg)

**Tags:** lightning-network


---

## 1 answers

### Answer by username_1 on 2018-05-26. Score: 1

It is part of the basic concept of Docker that Docker assigns an IP address for you to the container.

But maybe this isn't what you are asking?

From what I can see on your screenshot, you have certain port mappings active, as listed under "PORTS". You should be able to access those ports under the IP of your Docker host as Docker will expose those port for you.

In other words: More often than not, you don't care about your container's IP address at all.


---

