Add entrypoint flags to service cli.#29228
Conversation
|
Design LGTM. |
|
Janky failure seems unrelated |
|
SGTM 👍
It would be great if we can have an IT for the issue |
|
Suppose I create a service with: Later I decide I want to change the command which is run, so I try to change the entrypoint: I think that would run And if I realize the mistake and try to fix it, I think |
|
LGTM Per @aaronlehmann's concern, it seems like setting Again, I am not sure what the application of |
|
On |
|
Sorry, I'm not clear on how to remove the args. Is it |
|
@dnephin needs a rebase 🙇 |
bd3710b to
4828f56
Compare
|
This is still green, and ready for review! |
cli/command/service/opts.go
Outdated
There was a problem hiding this comment.
If entrypoint is not specified on the commandline, (*ShlexOpt).Set won't be called, and Value will return nil here, preserving the default value, right?
There was a problem hiding this comment.
I believe that's correct. The value is set to []string(nil), which I guess is == nil in go.
4828f56 to
ea1af78
Compare
|
LGTM |
|
docs-review, cc @thaJeztah |
|
This will need an update to the CLI reference to document the new flag https://github.com/docker/docker/blob/master/docs/reference/commandline/service_update.md#service-update And some examples added https://github.com/docker/docker/blob/master/docs/reference/commandline/service_update.md#examples I gave this a spin to see how it works, but stumbled upon some weird behavior; This doesn't work, because the This works; This also doesn't work; the It looks like there's something wrong with the way |
Now that #30514 is merged, the flags should be coming from the source code. Do we still need to do this? |
b8e0562 to
df2d99c
Compare
|
@thaJeztah that's not the way
|
We should have a look at that; either have a script to update the |
Yes I doubted about that; wondering why |
|
We should definitely remove the usage in Markdown. That's what I did for the man pages. |
Oh good point. Since It would probably be good to fix the code and make it more consistent, but maybe in a fresh PR? |
Sure! I just noticed it, and wrongly assumed it would accept multiple args to be passed separately |
|
ping |
|
Oh, sorry, I thought you were planning to add the flag to the CLI docs, while we haven't made changes yet on the CLI reference on GitHub. Looks like it needs a rebase now 😢 |
Signed-off-by: Daniel Nephin <[email protected]>
df2d99c to
d3ea30d
Compare
|
Rebased. We did the work to automate the cli reference so that we could remove the need to do this extra work. I would be happy to remove all the flags from the docs in another PR. |
Fixes #29171
Adds an
--entrypointflag todocker service createanddocker service update.I believe this also fixes a (possibly unreported) bug in
docker service updatewhen the arg to--argswas an invalid shlex string. The error was being ignored.