Skip to content

Instantly share code, notes, and snippets.

@phelewski
Created May 12, 2020 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phelewski/f5e242f151b21adc47cc5d66b5c143bb to your computer and use it in GitHub Desktop.
Save phelewski/f5e242f151b21adc47cc5d66b5c143bb to your computer and use it in GitHub Desktop.
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