You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues, it hasn't been reported yet
Issue description
The --docker-arg option of invoke local does not appear to support multiple instances, despite the example used in the reference page
--docker-arg Pass additional arguments to docker run command when --docker is option used. e.g. --docker-arg '-p 9229:9229' --docker-arg '-v /var:/host_var'
Combining all the desired docker arguments into one string doesn't work either.
As a test, I edited the local copy of lib/cli/commands-schema/aws-service.js in my npm's node_modules folder like this:
// lib/cli/commands-schema/aws-service.js'docker-arg': {usage: 'Arguments to docker run command. e.g. --docker-arg "-p 9229:9229"',type: 'multiple',// <--- added this line},
And that resolved the issue for me. I would be happy to submit a pull request for this minor change if indeed serverless is intended to support multiple instances of --docker-arg.
I observed this using the go1.x runtime, which runs with Docker by default. However, I think the issue would be relevant for all runtimes.
Are you certain it's a bug?
Is the issue caused by a plugin?
Are you using the latest v3 release?
Is there an existing issue for this?
Issue description
The
--docker-arg
option ofinvoke local
does not appear to support multiple instances, despite the example used in the reference pageCombining all the desired docker arguments into one string doesn't work either.
As a test, I edited the local copy of
lib/cli/commands-schema/aws-service.js
in my npm'snode_modules
folder like this:And that resolved the issue for me. I would be happy to submit a pull request for this minor change if indeed serverless is intended to support multiple instances of
--docker-arg
.I observed this using the
go1.x
runtime, which runs with Docker by default. However, I think the issue would be relevant for all runtimes.Service configuration (serverless.yml) content
Command name and used flags
sls invoke local --function dataloader --docker-arg '-p 9229:9229' --docker-arg '-v /var:/host_var'
Command output
Environment information
The text was updated successfully, but these errors were encountered: