Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Bash completion for Docker in other consoles #1345

Closed
joshwget opened this issue Oct 23, 2016 · 8 comments
Closed

Bash completion for Docker in other consoles #1345

joshwget opened this issue Oct 23, 2016 · 8 comments

Comments

@joshwget
Copy link
Contributor

No description provided.

@joshwget joshwget added this to the v1.0 Milestone milestone Oct 23, 2016
@homme
Copy link

homme commented Jun 21, 2017

The following worked for me in the interim in terms of getting docker command completion:

sudo curl -L -o /etc/bash_completion.d/docker https://github.com/docker/cli/raw/master/contrib/completion/bash/docker

Then log out and back in again, or just source /etc/bash_completion.d/docker.

@TBK
Copy link

TBK commented Nov 4, 2018

Depending on your console the distro might prodive docker completion packages.

Here are the packages for Alpine:
https://pkgs.alpinelinux.org/packages?name=docker-*-completion&branch=v3.8

@olljanat
Copy link
Contributor

@niusmallnan would it be possible to get this one included? (at least to ubuntu console).

I'm receiving lot of feedback from our users that they don't like Rancher OS because of this is missing...

@niusmallnan
Copy link
Contributor

Add it to milestone v1.5.1.
We don't want the default console to be too complicated.
For other consoles, I think we can add it.

@niusmallnan niusmallnan changed the title Bash completion for ros and Docker Bash completion for Docker in other consoles Dec 24, 2018
@niusmallnan
Copy link
Contributor

niusmallnan commented Dec 24, 2018

It seems that integrating bash completion for Docker is very complicated for ROS, because ROS can switch user-docker and each docker has its own completion files.

Maybe we can only tell the user how to do it in the documentation.

Do you have any ideas? @olljanat

My current idea is:

  1. only try to support Ubuntu.
  2. The completion files will not be placed in the system by default, automatically downloaded through the network.
  3. we need to replace the completion files by ros docker-init hook, so that each user-docker can download its own completion files.

@olljanat
Copy link
Contributor

On Ubuntu bash completion file is /usr/share/bash-completion/completions/docker and one option would be just share that between user-docker and console and then it would works on all consoles and updated with user-docker version.

It looks to be that it have been tried to partly implement already https://github.com/rancher/os-services/blob/master/images/10-docker-18.06.1/prebuild.sh#L16

But it looks to be that after static packages have been migrated from get.docker.com to download.docker.com they don't contain completion scripts anymore.

What you think, would sharing completion file between container to be option? If not I can also live with situation that it is only available on Ubuntu console but I'm not sure if there is other users who would like use it with other consoles too.

@niusmallnan
Copy link
Contributor

Supported consoles:

  • alpine
  • centos
  • debian
  • fedora
  • ubuntu

Supported engines:

  • docker-18.06.0
  • docker-18.06.0_arm
  • docker-18.06.1
  • docker-18.06.1_arm

For the default console, it's a bit complicated to enable bash-completion. We want the default console to keep simple, therefore, the default console is not currently supported.

@kingsd041
Copy link
Contributor

@olljanat We have supported Docker Bash completion in other consoles in the rancheros v1.5.1-rc1 version.

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

No branches or pull requests

6 participants