domain container Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/domain-container/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Wed, 15 Jan 2020 21:59:02 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://www.anujvarma.com/wp-content/uploads/anujtech.png domain container Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/domain-container/ 32 32 Common Issues encountered while hosting your web app / website within a Container ( versus hosting it on the host server ) https://www.anujvarma.com/common-issues-encountered-while-hosting-your-web-app-website-within-a-container-versus-hosting-it-on-the-host-server/ https://www.anujvarma.com/common-issues-encountered-while-hosting-your-web-app-website-within-a-container-versus-hosting-it-on-the-host-server/#respond Wed, 15 Jan 2020 21:37:40 +0000 https://www.anujvarma.com/?p=6322 Issue 1 – Domain Joining Issue for Containers: A server can be domain joined. A container cannot. Solution to Issue 1 – Use an Active Directory gMSA. Create a gMSA […]

The post Common Issues encountered while hosting your web app / website within a Container ( versus hosting it on the host server ) appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
Issue 1 – Domain Joining Issue for Containers: A server can be domain joined. A container cannot.
Solution to Issue 1 – Use an Active Directory gMSA. Create a gMSA in AD – and run the container as an authorized service under this gMSA (like a service account). This essentially ‘joins’ the container to the Domain.

Issue 2 – Installing certificates for your website / webapp inside a container
Solution to Issue 2 – You need powershell on windows or bash on linux. For Windows, add the following to your DOCKERFILE

RUN mkdir C:\cert

#cert folder contains the certificates MyCertificate.cer & myprivatekey.pfx. Add these to the docker folder /cert
ADD cert/ /cert

RUN powershell -NoProfile -Command \
certutil -addstore "Root" "C:/cert/MyCertificate.cer"

RUN powershell -NoProfile -Command \
certutil -importpfx -p "password" "C:/cert/myprivatekey.pfx"

RUN powershell -NoProfile -Command \ 
New-WebBinding -Name "YourWebsite" -IP "*" -Port 1234 -Protocol https

RUN powershell -NoProfile -Command \
get-item cert:\LocalMachine\MY\thumbprint-of-your-cert | New-Item 0.0.0.0!1234

The post Common Issues encountered while hosting your web app / website within a Container ( versus hosting it on the host server ) appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
https://www.anujvarma.com/common-issues-encountered-while-hosting-your-web-app-website-within-a-container-versus-hosting-it-on-the-host-server/feed/ 0