Docker and .bash_history

前端 未结 6 1826
感动是毒
感动是毒 2020-12-30 19:58

Is there any way to share a .bash_history volume with a docker container so that everytime I go into a shell I have my bash history available for scrolling thro

6条回答
  •  暖寄归人
    2020-12-30 20:30

    To keep IPython history, you can set the IPYTHONDIR environment variable to somewhere within your mapped volume.

    The docker-compose.override.yml would look like this:

    version: '2'
    services:
      some-service:
        environment:
          - IPYTHONDIR=/app/.ipython
        volumes:
          - .:/app
    

提交回复
热议问题