Docker Ubuntu image missing prompt, color and completion?

If I create a new Docker image based from ubuntu:14.04 image and run it with:

docker run -i --name="TEST" ubuntu:14.04 /bin/bash

then I will have a minimalistic Ubuntu with Bash running, but I won’t get a prompt and the auto-completion for files/folders does not work. Also if I try to edit a file using vi then the terminal will corrupt everything shown on the screen, and arrows wont work either.

  • Jenkins SCM Sync Configuration Plugin In Docker Won't Talk to Github
  • Mac host doesn't like Docker container port forwarding
  • Running nginx-proxy in docker with ssl
  • Passing a docker container's generated name to another container in docker-compose
  • Docker continuum/miniconda3 container not showing “conda”
  • Vagrant would not provision docker
  • So how can I create a new image from ubuntu:14.04 where the ‘normal’ Bash-like functionality from a ‘normal’ terminal from the Ubuntu Desktop distribution is working so that I have the same colored prompt, auto-completion of files/folders are working and also vi works as expected?

    EDIT: I’m running boot2docker on Windows if that makes any difference!?

  • How can I set the current working directory for docker exec with an internal bash shell?
  • How to enable docker API to access via http
  • How to get minio-server version in docker?
  • Having difficulty accessing the Jupyter notebook when trying to run TensorFlow through Docker
  • concourse fails to put to private docker registry, retrying until 500 error appears
  • move default docker container to another place on the disk
  • One Solution collect form web for “Docker Ubuntu image missing prompt, color and completion?”

    You’re missing -t flag to allocate a pseudo-tty for your container:

    docker run -it --name="TEST" ubuntu:14.04 /bin/bash

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.