I use command: docker run --rm -it govim bash -l to run docker images but it does not display color output. If I source ~/.bash_profile or run
docker run --rm -it govim bash -l
source ~/.bash_profile
Adding to VonC's answer, I made this bash function:
drun() { # start container with the specified entrypoint and colour terminal if [[ $# -lt 2 ]]; then echo "drun needs 2+ arguments: image entrypoint" >&2 return fi docker run -ti -e "TERM=xterm-256color" "$@" }