I am trying to configure a non-interactive client login in a Sitecore 10 container environment (https://doc.sitecore.com/en/developers/100/developer-tools/configure-a-non-interactive-client-login.html). So I am going to have to deploy a config file to the /config folder of the identity server container. I figure this should be no big deal. I extend my docker-compose.override.xml file to support a volume/entrypoint on the id server:
id:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id:${VERSION:-latest}
build:
context: ./docker/build/id
args:
BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION}
TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
depends_on:
- solution
environment:
Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup2: https://${HRZ_HOST}
volumes:
- ${LOCAL_DEPLOY_PATH}\identity:C:\deploy
entrypoint: powershell -Command "& C:\tools\entrypoints\worker\Development.ps1"
Then I extend the id dockerfile
# escape=`
ARG BASE_IMAGE
ARG TOOLING_IMAGE
ARG SOLUTION_IMAGE
FROM ${SOLUTION_IMAGE} as solution
FROM ${TOOLING_IMAGE} as tooling
FROM ${BASE_IMAGE}
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
WORKDIR C:\config
COPY --from=solution \artifacts\Identity\ .\
I then docker-compose build and then dock-compose up -d. Easy Peasy.
But for some reason when I bring up the ID container, I get the error:
& : The term 'C:\tools\entrypoints\worker\Development.ps1' is not recognized
as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:3
+ & C:\tools\entrypoints\worker\Development.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\tools\entryp...Development.p
s1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I am confused. I have the tooling image included and am using the correct powershell on the entrypoint, but it appears that the tools image is not recognized when trying to create the entrypoint. What am I missing?
Thanks in advance.