# Containerized networking

**URL:** <https://forums.foundationdb.org/t/containerized-networking/4795>\
**Category:** Running FoundationDB\
**Created:** [March 4, 2025, 6:57pm UTC](https://forums.foundationdb.org/t/containerized-networking/4795 "2025-03-04T18:57:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![czephyr](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@czephyr](https://forums.foundationdb.org/u/czephyr)\
**Post date:** [March 4, 2025, 6:57pm UTC](https://forums.foundationdb.org/t/containerized-networking/4795/1 "2025-03-04T18:57:23Z")

</div>

Hello,  
I’m struggling to understand how the networking works once fdb is running in a container.

Lets take this `docker-compose.yml` as an example

```auto
services:
  foundationdb:
    image: foundationdb/foundationdb:7.3.63
    network_mode: host
    user: root
    init: true
    environment:
      FDB_CLUSTER_FILE: /etc/foundationdb/fdb.cluster
    entrypoint: ["/usr/bin/fdbmonitor"]
    command: '--conffile /var/foundationdb.conf'
    volumes:
      - ./fdb.cluster:/var/fdb.cluster
      - ./foundationdb.conf:/var/foundationdb.conf
  fdb-ops:
    build: .
    network_mode: host
    environment:
      FDB_CLUSTER_FILE: /etc/foundationdb/fdb.cluster
    volumes:
      - ./fdb.cluster:/etc/foundationdb/fdb.cluster
  webserver:
    image: nginx:alpine
    network_mode: host
    container_name: simple-webserver

```

fdb.cluster:

```auto
docker:docker@127.0.0.1:4600

```

foundationdb.conf:

```auto
[fdbmonitor]

[general]
restart_delay = 60
cluster_file = /var/fdb.cluster

[fdbserver]
command = /usr/bin/fdbserver
public_address = 127.0.0.1:$ID
listen_address = public
datadir = /var/lib/foundationdb/data/$ID
locality_machineid = test
locality_dcid = test1
trace_format = json

[fdbserver.4600]

```

All of this is running on host networking.

I would want to reach the cluster from the `fdb-ops` container.

I can reach the webserver from the `fdb-ops` container using `curl localhost:80` but it doesn’t seem like I’m able to reach the fdb cluster where I expect it to be on `localhost:4600`. Why?

From the host machine I see the process is listening on

```auto
tcp LISTEN 0 128 127.0.0.1:4600 0.0.0.0:* users:(("fdbserver",pid=393730,fd=14)) 

```

I cant even access it when I try from inside the fdb container

```auto
bash-5.1# fdbcli -C /var/fdb.cluster 
Using cluster file `/var/fdb.cluster'.
^CERROR: Asynchronous operation cancelled (1101)
bash-5.1# cat /var/fdb.cluster 
docker:docker@127.0.0.1:4600

```

What am I missing in my understanding here?
