# Multiple docker instances on the same host share the same connection

**URL:** <https://forum.inductiveautomation.com/t/multiple-docker-instances-on-the-same-host-share-the-same-connection/37452>\
**Category:** Ignition\
**Created:** [August 6, 2020, 1:20pm UTC](https://forum.inductiveautomation.com/t/multiple-docker-instances-on-the-same-host-share-the-same-connection/37452 "2020-08-06T13:20:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![abiesbiogas](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@abiesbiogas](https://forum.inductiveautomation.com/u/abiesbiogas)\
**Post date:** [August 6, 2020, 1:20pm UTC](https://forum.inductiveautomation.com/t/multiple-docker-instances-on-the-same-host-share-the-same-connection/37452/1 "2020-08-06T13:20:59Z")

</div>

I run more than one ignition container on the same host, binding the ports 8088 and 8043 to different couples for each instance and it’s really cool, because in a while I can set up the gateway and work with several designers at the same time.

Actually I’m not a docker expert and probably I miss or I misunderstand some networking concepts, but I cannot manage to isolate the gateway page for those instances: after I logged into the page **localhost:80xx** I log into the page **localhost:80yy** , then I go back to **localhost:80xx** and I have to login again, and so on, back and forth I have to log in any time i browse a different gateway page

This is the docker-compose.yml:

````auto
services:
  gateway:
    container_name: "Ignition8087"
    image: kcollins/ignition:7.9.14  
    ports:
      - 8087:8088
      - 8042:8043
    networks: 
      - net_Ignition87
    stop_grace_period: 30s
    volumes:
      - .\gateway_backup.gwbk:/restore.gwbk
      - data8087:/var/lib/ignition
      - .\log:/var/log/ignition
    environment:
      GATEWAY_SYSTEM_NAME: "Ignition@8087"
      GATEWAY_ADMIN_PASSWORD: password
      GATEWAY_NETWORK_AUTOACCEPT_DELAY: 120  

volumes:
  data8087:
    external: True

networks: 
  net_Ignition87:
    driver: bridge```

Thank you for your help
````

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 6, 2020, 4:35pm UTC](https://forum.inductiveautomation.com/t/multiple-docker-instances-on-the-same-host-share-the-same-connection/37452/2 "2020-08-06T16:35:22Z")

</div>

More on this behavior here:

> [@Odd behavior when running multiple 8.0.X Gateways in one PC](http://forum.inductiveautomation.com/t/odd-behavior-when-running-multiple-8-0-x-gateways-in-one-pc/36005):
>
> This week, after the announcement of Ignition Maker Edition, I downloaded the Windows ZIP installer, and unzipped it into two locations, each with a different purpose; one would be full-fleged Ignition, and the other Maker Edition. Since in my company we are still supporting 7.9, I’ve been doing this ZIP installs for quite some time; having each Gateway registered with its own service name, and configuring all in different ports (HTTP, HTTPS, Metro SSL). Before this week I was only running 7.9…

It's a function of the webserver not isolating the session authentication cookies per host:ip - only per host. There's a workaround mentioned there, but I wouldn't necessarily recommend it unless you really know what you're doing.  
If you're developing entirely on the local machine, there should be internal IPs for each container that are unique - something like `172.17.0.X`. You can access whatever port on that internal IP, regardless of what the container is set to expose.

---

<div class="post-metadata">

**Author:** ![abiesbiogas](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@abiesbiogas](https://forum.inductiveautomation.com/u/abiesbiogas)\
**Post date:** [August 6, 2020, 5:57pm UTC](https://forum.inductiveautomation.com/t/multiple-docker-instances-on-the-same-host-share-the-same-connection/37452/3 "2020-08-06T17:57:32Z")

</div>

> [@paul-griffith](#):
>
> It’s a function of the webserver not isolating the session authentication cookies per host:ip - only per host

Thank you PGriffith!  
Your suggestion led me to a very easy solution (tested and working 😁)  
I edited my hosts file and added the following lines:

```auto
127.0.0.1 ignition.87
127.0.0.1 ignition.90

```

Now I can log in to `http://ignition.87:8087/` and to `http://ignition.89:8089/` at the same time without interference.  
All I needed is a pool of hostnames pointing at my local IP

Thank you again 👍 🖖
