Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker service constraint tab auto completion #32296

Closed
wants to merge 1 commit into from

Conversation

JoshkVFX
Copy link

@JoshkVFX JoshkVFX commented Apr 1, 2017

- What I did
Altered the tab completion results for docker service update

- How I did it
Changed contrib/completion/bash/docker to reflect the new results

- How to verify it
Attempt a tab completion with a successfully built docker version

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@GordonTheTurtle GordonTheTurtle added dco/no Automatically set by a bot when one of the commits lacks proper signature status/0-triage labels Apr 1, 2017
Signed-off-by: Josh <josh@kelly.camera>
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Apr 1, 2017
@JoshkVFX
Copy link
Author

JoshkVFX commented Apr 1, 2017

Issue link here

Not sure if GordonTheTurtle's reply was automated or not, assuming it was but thanks either way. It's incredibly helpful

@@ -3035,7 +3035,8 @@ _docker_service_update_and_create() {

if [ "$subcommand" = "create" ] ; then
options_with_args="$options_with_args
--constraint
--constraint-add
--constraint-rm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right, because docker service create only has --constraint, not --constraint-add / --constraint-rm. The completion for that is done in the if [ "$subcommand" = "update" ] section; https://github.com/docker/docker/blob/1ecaed0a99331ff6140e0a714e1b50d466597775/contrib/completion/bash/docker#L3085-L3089

@thaJeztah
Copy link
Member

Can you check if you have the latest version of the completion script installed on your machine? This completion works for me without this change

@JoshkVFX
Copy link
Author

JoshkVFX commented Apr 1, 2017

Damn, I appear to modified the wrong command.

Create already had the correct commands attached to it but I'm still getting the wrong autocompletion for update.

I believe I'm on the most up to date version but are there any extra steps I can take to test if I am on the right auto completion version?

@thaJeztah
Copy link
Member

You can check the file in /usr/share/bash-completion/completions/docker, but based on the output of your docker version in the issue #32295 (comment), you have an older version of docker (1.12.6) installed, which did not have this as a completion; https://github.com/docker/docker/blob/v1.12.6/contrib/completion/bash/docker#L1755-L1761. The fix was added in #31784, which is part of the upcoming 17.04 release.

@thaJeztah
Copy link
Member

Let me close this PR, because this issue is already fixed, but feel free to continue the discussion

@JoshkVFX
Copy link
Author

JoshkVFX commented Apr 1, 2017

Sorry about that, my fault for not properly checking things and getting ahead of myself.

Is there a specific spot where I can find up to date instructions on how to install and keep docker up to date? So far everyone has said not to use apt-get and use specific repositories but that one says I'm up to date.

@thaJeztah
Copy link
Member

basically, if you add the right repository, you can either "pin" a specific version, or do apt-get update && apt-get install docker-ce, and you'll automatically get the latest version.

We recently switched to a different version scheme, and package names. Previously the package was named docker-engine, and now is called docker-ce (community edition), or docker-ee (enterprise edition, which is the paid-for version with professional support, SLA's etc)

The docker-engine package is still available on get.docker.com (bit-for-bit identical to the docker-ce package currently), and the new packages (docker-ce) are available on the download.docker.com apt/yum repository.

There's now two release channels; "edge" (a monthly release), and "stable" (released every 3 months, with a 4-month "support" for critical bugfixes and security issues).

To get just the "stable" updates, only enable the "stable" repository, and to get both "stable" and "edge" (monthly) updates, enable both repositories.

The installation instructions can be found here; https://docs.docker.com/engine/installation/linux/ubuntu/, and also mention removing "docker-engine" before installing "docker-ce" (although I think it goes automatically if you install the docker-ce package)

@JoshkVFX
Copy link
Author

JoshkVFX commented Apr 1, 2017

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants