Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

BCContainer Networking and Setting a static IP

Posted on by 10

Hi!

We are focused on using Docker EE on Win2019 for app development across our company. Using current Docker version and current BCContainerHelper

We were able to get a BCContainer installed on a transparent network. (network="tlan1")

However when applying the IP address additional parameter (IP="192.168.3.197") for example, we found that the container picked up that IP address, but the BC instance is using DHCP to get a dynamic IP from our IP pool.  Really strange behavior I think.

i.e.

PS > Get-BcContainerIpAddress -containerName LabDocker1
192.168.0.12

This ip was served by DHCP

but:

PS C:\Windows\system32> docker network inspect tlan1

{
"Name": "tlan1",
"Id": "<xxxremoved for this postXXX>",
"Created": "2022-07-12T15:30:49.8789726-04:00",
"Scope": "local",
"Driver": "transparent",
"EnableIPv6": false,
"IPAM": {
"Driver": "windows",
"Options": {},
"Config": [
{
"Subnet": "192.168.0.0/22",
"Gateway": "192.168.2.10"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"16432a42dc0bfd371f73add4c5ab1b425eb31f8c3ed528f2be295bc044b66c1e": {
"Name": "LabDocker1",
"EndpointID": "888bd68f3cdbde8b0ad07ab9ffdf952d08a4307c86db99c96cf276d6dc73cc30",
"MacAddress": "00:15:5d:22:2e:9a",
"IPv4Address": "192.168.3.197/24",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.windowsshim.hnsid": "54404D4E-D15F-4490-A11F-DD0CE2A82BDB"
},
"Labels": {}
}

We can reach BC on the dynamic IP, but not the static IP.

Any ideas?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,748 Super User 2024 Season 1 on at
    RE: BCContainer Networking and Setting a static IP

    Using træfik might also be an option for you:

    doc.traefik.io/.../

  • Mkay Profile Picture
    Mkay 10 on at
    RE: BCContainer Networking and Setting a static IP

    Mohamad Vajid thank for the suggestion.  I will submit there as well.

  • Suggested answer
    RE: BCContainer Networking and Setting a static IP

    Hello.

    I think it may be better to post this over at GitHub - microsoft/navcontainerhelper: Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.

    The issue itself is not related to Business Central and support for BcContainerHelper is provided over at the Github repo.

    Having said that, you may try to connect the container to your specific network using docker network connect --ip but again this is out of scope for BC, sorry.

    Thank you,
    Mohamad

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: BCContainer Networking and Setting a static IP

    Hello,

    I will ask internally if someone came across this issue.

    Thank you.

  • Mkay Profile Picture
    Mkay 10 on at
    RE: BCContainer Networking and Setting a static IP

    Thanks for taking the time to respond Marco.  I don't think this is a docker IP problem as it appears that the container is recognizing the static IP.

  • Marco Mels Profile Picture
    Marco Mels on at
    RE: BCContainer Networking and Setting a static IP

    Hello,

    Maybe this helps:

    github.com/.../4952

    Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans