I want to install hylard on docker,while running this powershell Script :
docker run -p 8084:8084 -p 9000:9000\
>> --name halyard --rm \
>> -v ~/.hal:/home/spinnaker/.hal\
>> -d\
>> gcr.io/spinnaker-marketplace/halyard:stable
I get the following error:
At line:2 char:3
+ --name halyard --rm \
+ ~
Missing expression after unary operator '--'.
At line:2 char:3
+ --name halyard --rm \
+ ~~~~
Unexpected token 'name' in expression or statement.
+ CategoryInfo : ParserEr`enter code here`ror: (:) [],
ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingExpressionAfterOperator
Any workaround?
Here's a couple of things to try:
In bash, \<newline>
is treated as a line continuation. I.e. a backslash followed directly by a <newline>
. You can't have any whitespace between them as you do at the end of the first line in your example.
It's hard to say if the whitespace is actually in your script or just part of the formatting of your SO post, but it's worth checking and removing any trailing whitespace found.
In Powershell you need to use backtick `
instead of backslash \
to break your command to multiple lines.
E.g:
docker run -p 8084:8084 -p 9000:9000 `
>> --name halyard --rm `
>> -v ~/.hal:/home/spinnaker/.hal `
>> -d `
>> gcr.io/spinnaker-marketplace/halyard:stable