cyc*_*tic 6 linux bash shell docker
当我跑
docker run -i -t python /bin/bash
结果终端没有颜色。
我查看了以下链接,但没有帮助:
https://groups.google.com/forum/#!topic/docker-user/Bp4BaWRw6k4
https://github.com/docker/docker/issues/9299
我在 Windows 10 上使用 Docker 工具箱中的 Docker 快速入门终端。我有 Docker 版本 1.12.0,构建 8eab29e。
小智 6
要解决此问题,您需要更新~/.bashrc文件。
添加这样的东西(从默认的 Ubuntu~/.bashrc文件中借来的)应该可以解决问题:
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
更新~/.bash文件后,您需要通过运行重新加载文件source ~/.bashrc。
您可能想要创建自己的 dockerfile 来自动执行此操作。
| 归档时间: | 
 | 
| 查看次数: | 3239 次 | 
| 最近记录: |