bash-completion does not work for apt-get #75
Comments
I can confirm that installing FROM ubuntu:yakkety
RUN apt-get update -qq && apt-get install -yqq bash-completion && rm -rf /var/lib/apt/lists/* $ docker build -
...
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM ubuntu:yakkety
---> 31005225a745
Step 2/2 : RUN apt-get update -qq && apt-get install -yqq bash-completion && rm -rf /var/lib/apt/lists/*
---> Running in f2652cdfb4fd
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package bash-completion.
(Reading database ... 6513 files and directories currently installed.)
Preparing to unpack .../bash-completion_1%3a2.1-4.3ubuntu1_all.deb ...
Unpacking bash-completion (1:2.1-4.3ubuntu1) ...
Setting up bash-completion (1:2.1-4.3ubuntu1) ...
---> 3fbf18528d4e
Removing intermediate container f2652cdfb4fd
Successfully built 3fbf18528d4e
$ docker run -it --rm 3fbf18528d4e bash --login -i
root@c65f6c083a4c:/# apt-get update -qq
root@c65f6c083a4c:/# apt-get in^I # completes to "install"
root@c65f6c083a4c:/# apt-get install libopen^I # (nothing) |
Upate: I can confirm that issue for a quick solution I use ZSH, there the bash_completition is fully working, but not with bash. |
I run into this today. (I'm using docker to run ubuntu 1604 opengl GUI software in ubuntu 1804) There are two problems here:
Long explains of the issue:
however, this
This is because of the docker-clean apt setting.
Two problems for the completion:
I can understand why we want to remove the pkgcache. So my solution is just a partial fix. But it serve my purpose well. My docker is a long run container and I prefer the cache. |
Nice, good find! 👍 (and thanks for giving such a detailed explanation) Closing, since this is caused by configuration that's by design (and the workaround is now documented here, and for me is the second Google result for "docker ubuntu apt-get bash completion"). |
I have written following dockerfile:
But when I run this image:
bash-completion for apt-get install does not work,
gives me a beep from a speaker and no output.
I am running docker 1.12.6 on Windows 10.
The text was updated successfully, but these errors were encountered: