Force bash history to be flushed before executing commands

This commit is contained in:
Kristóf Tóth
2018-04-18 13:19:51 +02:00
parent 8e8963b0f8
commit 117e7ffc18
2 changed files with 23 additions and 8 deletions

View File

@ -39,14 +39,9 @@ ENV PYTHONPATH="/usr/local/lib/" \
TFW_HISTFILE="/home/${AVATAO_USER}/.bash_history" \
PROMPT_COMMAND="history -a"
RUN echo "shopt -s cmdhist\n" \
"shopt -s histappend\n" \
"unset HISTCONTROL\n" \
"export HISTFILE=$TFW_HISTFILE\n" \
"export HISTFILESIZE=1000\n" \
"export HISTSIZE=1000\n" \
'PROMPT_COMMAND="history -a"\n' \
>> /home/${AVATAO_USER}/.bashrc
COPY bashrc /tmp
RUN echo "export HISTFILE=${TFW_HISTFILE}\n" >> /tmp/bashrc &&\
cat /tmp/bashrc >> /home/${AVATAO_USER}/.bashrc
COPY supervisor/supervisord.conf ${TFW_SUPERVISORD_CONF}
COPY nginx/nginx.conf ${TFW_NGINX_CONF}