DEV Community

tetractius
tetractius

Posted on

TetraQuicky09: Get back autocomplete in a Docker container

How many time you shouted as crazy because you could get autocomplete in an ubuntu docker container...

Well: that's life; it is like this by design for a gazillion of very good reasons. Never the less if you are not a genius that can manage to get a container working at the first untested write of the Dockerfile, chances are that you need to -it /bin/bash in a container to understand what the hell it's going on.

And it is there where you understand that life has been unfair with you. You don't have the auto-complete.

But, getting it back, is very easy...

Just install the bash autocompletion:

$ apt-get install bash-completion

and remove one file

$ rm /etc/apt/apt.conf.d/docker-clean

then you have to exit from there...
The container will die. Again: that's life.
But if you docker ps -a you get the id of the container you just kill it and you restart it and you attach to it...

docker start <last container>
docker attach <last container>

a couple of ENTER keys and... Voila'!!

You can TAB ... TAB all your life that has been wasted so far in cmd.com not tab tabbing. :)

Peach, stay home and stay safe!!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay