1

I was trying to run Sitecore in Docker and was following the document at https://github.com/Sitecore/docker-examples.

It broke while spinning up the CM instance. The error I received is the following:

the term 'c:toolsentryendpointsiisdevelopment.ps1' is not recognized

I checked everything including my steps, Google and Bing search. I am unable to understand where it is going wrong.

In case it matters, the set-up is in a nested VM.

1
  • 1
    Looks like back slashes got lost in the script path... should be smth like c:\tools\entryendpoints\iis\development.ps1. UPD Just checked my local 10.3 containers. The script path is c:\tools\entrypoints\iis\development.ps1 (not 'entryENDpoints') Commented Jul 7, 2023 at 13:11

1 Answer 1

2

Seems like the issue is due to the absence of an escape character in the script. In the docker-compose.override.yml file located at docker-examples/custom-images/docker-compose.override.yml, the entry point for the CM node specifies the command as entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1".

In PowerShell, the ampersand (&) is used to invoke a script or command. However, the backslash (\) is an escape character in YAML syntax. To ensure that the backslashes are interpreted correctly and treated as literal characters when executing the PowerShell command, they need to be properly escaped.

To resolve this issue, make sure you include the necessary escape characters when running the script. Here's an example of how the command should be executed:

powershell -Command "& \"C:\\tools\\entrypoints\\iis\\Development.ps1\""

By adding double quotes (") around the script path and escaping each backslash with another backslash, you ensure that the PowerShell command correctly recognizes the path.

Please give this modified command a try and see if it resolves the problem you encountered while spinning up the CM instance in Docker.

1
  • I made the suggested changes and reran the command. The script is reverting the changes. I am working on it to identify the line of code. Commented Jul 12, 2023 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.