diff --git a/examples/demo-container-images-shared/Dockerfile b/examples/demo-container-images-shared/Dockerfile index 734490f..27b41b0 100644 --- a/examples/demo-container-images-shared/Dockerfile +++ b/examples/demo-container-images-shared/Dockerfile @@ -1,6 +1,8 @@ #FROM public.ecr.aws/lambda/provided:al2023 ## INSTALL POWERSHELL RUNTIME FROM 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-runtime:latest as runtime-files +## Install gss-ntlmssp and related packages for NTLM authentication +# FROM 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-remoting-ntlm:latest as remoting-files ## INSTALL AWS SDK FROM 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-modules-aws-tools:latest as module-files @@ -8,6 +10,8 @@ FROM 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-modules-aws-tools:l FROM public.ecr.aws/lambda/provided:al2023 ## Copy PowerShell runtime files COPY --from=runtime-files . / +## Copy NTLM auth files +# COPY --from=remoting-files . / ## Copy Module files COPY --from=module-files . / ## Function files @@ -15,4 +19,4 @@ COPY /function/ /var/task ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 WORKDIR /var/task ENTRYPOINT [ "/var/runtime/bootstrap" ] -CMD [ "examplehandler.ps1::handler" ] \ No newline at end of file +CMD [ "examplehandler.ps1::handler" ] diff --git a/examples/demo-container-images-shared/powershell-remoting-ntlm/Dockerfile b/examples/demo-container-images-shared/powershell-remoting-ntlm/Dockerfile new file mode 100644 index 0000000..6cc73b3 --- /dev/null +++ b/examples/demo-container-images-shared/powershell-remoting-ntlm/Dockerfile @@ -0,0 +1,47 @@ +# syntax=docker/dockerfile:1 + +# This image is based on the existing powershell-runtime image. +# Set any of the arguments as needed in case you customized the image details. +ARG REGISTRY=.dkr.ecr..amazonaws.com +ARG RUNTIME_IMAGE=${REGISTRY}/powershell-remoting +ARG RUNTIME_TAG=latest +ARG RUNTIME=${RUNTIME_IMAGE}:${RUNTIME_TAG} + +FROM ${RUNTIME} as build + +WORKDIR /tmp + +# These build dependencies are documented here: +# https://github.com/gssapi/gss-ntlmssp/blob/main/contrib/gssntlmssp.spec.in#L13 +RUN dnf install -y \ + autoconf automake docbook-style-xsl doxygen findutils krb5-devel \ + libtool libxml2 libxslt libunistring-devel m4 pkgconfig openssl-devel + +# These build dependencies are also needed but not in the spec file. +# It's easier to iterate on these packages when they are in their own RUN step. +RUN dnf install -y rpm-build gettext-devel libwbclient-devel zlib-devel + +# Build gssntlmssp +RUN <