Describe the issue
In BCContainerHelper with Traefiks the wrong TCP/IP-Port will be setup for the DeveloperServicesPort (7083 instead of 7049). In NAVContainerHelper, same Setup and same New-NavContainer Script this DeveloperServicesPort works.
Scripts used to create container and cause the issue
BcContainerHelper is version 1.0.19
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2019 Standard - ltsc2019
Docker Client Version is 19.03.14
Docker Server Version is 19.03.14
Fetching all docker images
Enabling SSL as otherwise all clients will see mixed HTTP / HTTPS request, which will cause problems e.g. on the mobile and modern windows clients
Using image mcr.microsoft.com/businesscentral:10.0.17763.1757
PublicDnsName is dockerhost.some.company
Creating Container bc14docker
Version: 14.22.46358.0-de
Style: onprem
Multitenant: No
Platform: 14.0.46351.0
Generic Tag: 1.0.1.4
Container OS Version: 10.0.17763.1757 (ltsc2019)
Host OS Version: 10.0.17763.1757 (ltsc2019)
Using process isolation
Using locale de-DE
Adding special CheckHealth.ps1 to enable Traefik support
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\ProgramData\mycompany\dockerLicenseFiles\2021-02-11_mycompany_BC.flf
Additional Parameters:
--volume C:\ProgramData\mycompany\dockerBakFiles\:c:\bak
--volume C:\ProgramData\mycompany\dockerAddIns:c:\addins
--hostname pi-dockertest
-e webserverinstance=bc14docker
-e publicdnsname=dockerhost.some.company
-l "traefik.protocol=https"
-l "traefik.web.frontend.rule=PathPrefix:/bc14docker"
-l "traefik.web.port=443"
-l "traefik.soap.frontend.rule=PathPrefix:/bc14dockersoap;ReplacePathRegex: ^/bc14dockersoap(.*) /NAV$1"
-l "traefik.soap.port=7047"
-l "traefik.rest.frontend.rule=PathPrefix:/bc14dockerrest;ReplacePathRegex: ^/bc14dockerrest(.*) /NAV$1"
-l "traefik.rest.port=7048"
-l "traefik.dev.frontend.rule=PathPrefix:/bc14dockerdev;ReplacePathRegex: ^/bc14dockerdev(.*) /NAV$1"
-l "traefik.dev.port=7049"
-l "traefik.dl.frontend.rule=PathPrefixStrip:/bc14dockerdl"
-l "traefik.dl.port=8080"
-l "traefik.dl.protocol=http"
-l "traefik.enable=true"
-l "traefik.frontend.entryPoints=https"
--env customNavSettings=PublicODataBaseUrl=https://dockerhost.some.company/bc14dockerrest/odata,PublicSOAPBaseUrl=https://dockerhost.some.company/bc14dockersoap/ws,PublicWebBaseUrl=https://dockerhost.some.company/bc14docker
Files in C:\ProgramData\BcContainerHelper\Extensions\bc14docker\my:
- AdditionalOutput.ps1
- CheckHealth.ps1
- license.flf
- MainLoop.ps1
- mycompanySSL2020.PFX
- SetupCertificate.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatecontainerhosts.ps1
Creating container bc14docker from image mcr.microsoft.com/businesscentral:10.0.17763.1757
da5432f06d00a086cfc87b79ae56b78a55ee22f7684e6971a4c0f964da85034f
Waiting for container bc14docker to be ready
Using artifactUrl https://bcartifacts.azureedge.net/onprem/14.22.46358.0/de
Using installer from C:\Run\130
Copying Platform Artifacts
Copying Application Artifacts
Copying Database
Copying Installers
Copying TestToolKit
Copying UpgradeToolKit
Copying Extensions
Installing Business Central
Installing Url Rewrite
Installing OpenXML
Installing DotNetCore
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
Copying Web Client Files
Copying Windows Client Files
Copying PowerShell Scripts
Copying ConfigurationPackages
Copying Test Assemblies
Copying TestToolKit
Copying UpgradeToolKit
Copying Extensions
Copying ClientUserSettings
Copying ReportBuilder
Restoring CRONUS Demo Database
Determining Database Collation
Changing Database Server Collation to Latin1_General_100_CI_AS
Restoring CRONUS Demo Database
Installing C:\NAVDVD\Installers\DE\RTC\RoleTailoredClient.Local.De.msi
Skipping C:\NAVDVD\Installers\DE\WebHelp\WebHelp.Local.De.msi
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Installation took 124 seconds
Installation complete
Initializing...
Setting host.containerhelper.internal to 172.31.144.1 in container hosts file
Starting Container
Hostname is pi-dockertest
PublicDnsName is dockerhost.some.company
Using NavUserPassword Authentication
Certificate File Thumbprint 6ACA6C1529F27493A8915CD0215D9DA9339EB27E
Import Certificate to LocalMachine\my
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting PublicODataBaseUrl to https://dockerhost.some.company/bc14dockerrest/odata
Setting PublicSOAPBaseUrl to https://dockerhost.some.company/bc14dockersoap/ws
Setting PublicWebBaseUrl to https://dockerhost.some.company/bc14docker
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using license file 'c:\run\my\license.flf'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
Assign Premium plan for ADMIN
Container IP Address: 172.31.158.51
Container Hostname : pi-dockertest
Container Dns Name : pi-dockertest.dockertest.mycompany-informatik.de
Web Client : https://pi-dockertest.dockertest.mycompany-informatik.de/bc14docker/
Dev. Server : https://pi-dockertest.dockertest.mycompany-informatik.de
Dev. ServerInstance : NAV
Files:
http://pi-dockertest.dockertest.mycompany-informatik.de:8080/ALLanguage.vsix
Container Total Physical Memory is 32.0Gb
Container Free Physical Memory is 25.2Gb
Initialization took 84 seconds
Ready for connections!
Reading CustomSettings.config from bc14docker
Set SQL Server memory limit to 1024 MB
Container bc14docker successfully created
Because of Traefik, the following URLs need to be used when accessing the container from outside your Docker host:
Web Client: https://dockerhost.some.company/bc14docker
SOAP WebServices: https://dockerhost.some.company/bc14dockersoap
OData WebServices: https://dockerhost.some.company/bc14dockerrest
Dev Service: https://dockerhost.some.company/bc14dockerdev
File downloads: https://dockerhost.some.company/bc14dockerdl
Use:
Get-BcContainerEventLog -containerName bc14docker to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName bc14docker to get debug information about the container
Enter-BcContainer -containerName bc14docker to open a PowerShell prompt inside the container
Remove-BcContainer -containerName bc14docker to remove the container again
docker logs bc14docker to retrieve information about URL's again
Describe the issue In BCContainerHelper with Traefiks the wrong TCP/IP-Port will be setup for the DeveloperServicesPort (7083 instead of 7049). In NAVContainerHelper, same Setup and same New-NavContainer Script this DeveloperServicesPort works.
Scripts used to create container and cause the issue
Full output of scripts
Screenshots