Add separate volume for host, add command logging from container back to host

This commit is contained in:
sog 2020-04-18 10:38:17 -04:00
parent f99aa2226f
commit ffe6f44e15

30
dot_bashrc Normal file
View File

@ -0,0 +1,30 @@
[ -z "$PS1" ] && return
HISTCONTROL=ignoredups:ignorespace
shopt -s histappend
HISTSIZE=5000
HISTFILESIZE=5000
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
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# From https://twitter.com/ahakcil/status/1230854797613522944
ps1_state(){
ret=$?
if [ $ret -eq 0 ]; then
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xA5"
else
echo -e "[$(date +%H:%M:%S)]\xF0\x9F\x94\xB4->$ret "
fi
}
PS1='${debian_chroot:+($debian_chroot)}$(ps1_state)\[\033[01;31m\]\u\[\033[00m\][ \[\033[01;34m\]\w\[\033[00m\] ]\$ '
# From https://twitter.com/n00py1/status/1230755337797394434
script -f /logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log