There is no package on official alpine repositories yet. For testing purposes you can use one from this repo. To build it from source you can use below Dockerfile. You can replace base image with whatever you are going to use in your dotnet app. Please note - it will only work on Alpine 3.11 or above
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
RUN apk add --no-cache git curl
RUN apk add --no-cache make m4 autoconf automake gcc g++ krb5-dev openssl-dev gettext-dev
RUN apk add --no-cache libtool libxml2 libxslt libunistring-dev zlib-dev samba-dev
RUN git clone https://github.com/gssapi/gss-ntlmssp
WORKDIR gss-ntlmssp
RUN autoreconf -f -i
RUN ./configure --without-manpages --disable-nls
RUN make install
Once image is ready, just run temporary interactive container and copy gssntlmssp.so file (from .libs or /usr/local/lib/gssntlmssp) to your local file system
copy mech.ntlmssp.conf file to /usr/etc/gss/mech.d (make sure it's refering to proper gssntlmssp.so
location)
2.3 install dependencies - on dotnet sdk images it should be sufficient to add libwbclient, at least for webclient. If not - try to add some others:
apk add libwbclient libunistring libssl1.1 zlib libc6-compat
irm https://myntlmsite.com -Credential (Get-Credential MyNtlmUser)
Use below Dockerfile to install ntlm from this repo:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine
RUN apk add git libwbclient
RUN git clone https://github.com/mikeTWC1984/gssntlm
WORKDIR gssntlm
RUN mkdir -p /usr/local/lib/gssntlmssp /usr/etc/gss/mech.d
RUN cp gssntlmssp.so /usr/local/lib/gssntlmssp/
RUN cp mech.ntlmssp.conf /usr/etc/gss/mech.d
ENTRYPOINT [ "pwsh" ]
Start it interactivly and run above powershell test command from above.
*
You can actualy make it work on 3.10 too by upgrading packages from 3.11 repos
- in /etc/apk/repositories file change 3.10 to 3.11
- then run: apk update && apk upgrade