Skip to content

Instantly share code, notes, and snippets.

Created May 12, 2020
What would you like to do?
Visual Studios Code Remote - Container Blog | Persist Bash History
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
&& mkdir /commandhistory \
  && touch /commandhistory/.bash_history \
  && chown -R $USERNAME /commandhistory \
  && echo $SNIPPET >> "/home/$USERNAME/.bashrc"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment