From 19c1f473560ec2cd9c742fc300bc00a528ca3300 Mon Sep 17 00:00:00 2001 From: Dieter Blocher Date: Thu, 30 Jan 2025 11:24:48 +0100 Subject: [PATCH] Update .devcontainer/Dockerfile --- .devcontainer/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) 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.