Network configuration and ODBC configuration

Hello… I have some problems and I need help. The scenarios are as follows:

I have two hosts managed by VMware, one with Windows Server 2022 and the other with Windows 11 Pro 22H2 (both versions are supported by Docker). On these machines, I created Windows containers using Docker Desktop, with network configuration set to NAT. I can communicate from my container with the machines in the same network as my host, but I can’t contact the container from these machines.

My application uses ODBC connection, and I have tried to communicate through the ODBC of the host and the ODBC created on my container. However, I can’t connect using Windows authentication, and it’s not possible to use a specific DB user due to security reasons.

I attempted to add the Windows container to the domain of my host to resolve the issue mentioned in point 2. However, when I ran the command to add it to the domain in the container, I received the following message. This might be due to the network configuration not being bidirectional, as I mentioned in point 1.

Add-Computer : Computer ‘ContainerD2’ failed to join domain ‘XXXXXXX.bog’ from its current workgroup ‘WORKGROUP’ with
following error message: Unable to load the specified offline registry hive. Please ensure you have access to the
specified path location and permissions to modify its contents. Running as an elevated administrator may be required.
At line:1 char:1

  • Add-Computer -DomainName XXXXXXX.bog -Credential $credential -OUPath …
  •   + CategoryInfo          : OperationStopped: (BOGDOCKNOD2:String) [Add-Computer], InvalidOperationException
      + FullyQualifiedErrorId : FailToJoinDomainFromWorkgroup,Microsoft.PowerShell.Commands.AddComputerCommand

PS C:>

Please, I need help, and any comments will be appreciated. Thanks.

The issue was solved using gMSA in the ADC configuration.