persistent zsh history in volume

This commit is contained in:
Thies Lennart Alff 2022-05-02 09:30:45 +02:00
parent 485b1876c0
commit da5cab8e5c
2 changed files with 10 additions and 0 deletions

View file

@ -50,6 +50,9 @@ RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/
-a 'autoload -U promptinit; promptinit' \
-a 'prompt pure' \
-a 'PATH=$PATH:$HOME/.local/bin' \
-a 'export HISTFILE=/zsh_history/.zsh_history' \
-a 'export TERM=xterm-256color' \
-a "ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=161'" \
&& mkdir -p "$HOME/.zsh" \
&& git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure" \
&& echo "source /opt/ros/$ROS_DISTR/setup.zsh" >> /home/$USERNAME/.zshrc
@ -61,6 +64,9 @@ RUN vim +PluginInstall +qall
RUN cd /home/$USERNAME/.vim/bundle/YouCompleteMe \
&& python3 install.py --clangd-completer
USER root
RUN mkdir /zsh_history \
&& touch /zsh_history/.zsh_history \
&& chown -R $USERNAME /zsh_history
RUN chown -R $USERNAME /home/$USERNAME/
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View file

@ -33,9 +33,13 @@ services:
- type: bind
source: /var/run/avahi-daemon/socket
target: /var/run/avahi-daemon/socket
- "ros2_zsh_history:/zsh_history"
environment:
- DISPLAY=${DISPLAY}
- QT_X11_NO_MITSHM=1
- SHELL=/usr/bin/zsh
- ROS_WORKSPACE=/home/ros-user/uuv/ros2
volumes:
ros2_zsh_history: