It would be awesome if the following could be included in the image /root/.bashrc file.
It will
(1) Set the prompt to root@$THE_HOSTNAME:/path and
(2) Make it so that the default directory for new terminal sessions would be /app/public, which is more useful than starting in /root or /.
site_host () {
grep -i server.*name.dev /etc/apache2/sites-available/000-default.conf /etc/nginx/wordpress/site.conf 2>/dev/null| sed "s/. //" | sed “s/;//” | tail -1
}
PROMPT_COMMAND=‘echo -ne “\033]0;$(site_host)\007”’
export PS1=’${debian_chroot:+($debian_chroot)}\u@$(site_host):\w$ ’
if [ “$STY” == “” ]; then
cd /app/public
fi