We have a problem with using an API (implemented in .net core code) in a Docker container (in Linux CentOS7), authenticating to a domain (Microsoft AD).
In the domain (Microsoft AD), we have configured gMSA with a user account (used in the .net code in the API that is in the container) included in the group created to the gMSA.
The Linux host, where Docker is, is joined to the domain (Microsoft AD) and the communication between the Linux host and the domain (Microsoft AD) is working perfectly.
Also a “.jason file” was created following 2 posts in the MSDN of Microsoft for the connection of container Docker in Linux container applications with domain (Microsoft AD) according to the links below:
When trying to upload the contanier with the following command:
docker run -ti -p 80:80 --security-opt “credentialspec = file:/home/user/apitest/SpecCredential/gMSAservices.json”
I get the following error:
docker: Error response from daemon: invalid --security-opt 2:“credentialspec=file:/home/user/apitest/gMSAservices.json”.
Could help us with this problem, please?
PS. My version Docker is 18.05.0-ce, build f150324