Skip to main content
Business Central forum
Suggested answer

BCContainer Networking and Setting a static IP

editSubscribe (0) ShareShare
ReportReport
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?

Categories:
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,714 Super User 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.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,045 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,570 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans