diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0216706..973beb8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -14,6 +14,14 @@ RUN . /etc/os-release \ && if [ "$(dpkg --print-architecture)" = "amd64" ]; then apt-get install -y mongodb-database-tools; fi \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* +ARG USERNAME=node + +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" + # RUN rm -rf /home/node/.bash_history && touch /home/node/.bash_history && chown node:node /home/node/.bash_history # [Optional] Uncomment this section to install additional OS packages.