解决方案 #将source /root/.bashrc修改为 /bin/bash -c "source /root/.bashrc" 主要原因在于:基础镜像中使用的是sh而不是bash,而source是对应于bash的函数