【问题标题】:How to enable CLI history in docker container?如何在 docker 容器中启用 CLI 历史记录?
【发布时间】:2017-02-15 08:19:11
【问题描述】:

在我们公司,我们使用 docker 容器来开发和维护 Magento 站点。我们的工作站运行 Ubuntu 16.04。我希望在 docker 容器运行之间(docker-compose stopdocker-compose up 之间)保持命令行历史记录。我希望能够从上次容器运行中调用命令。

【问题讨论】:

标签: linux docker command-line-interface command-prompt


【解决方案1】:

对于 bash

卷:

    `- ./.data/shell_history/php_bash_history.txt:/home/www-data/.bash_history` 

对于 sh

卷:

     - ./.data/shell_history/nginx_bash_history.txt:/root/.ash_history #sh

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-01
    • 2013-06-26
    • 2014-06-07
    • 2023-04-08
    • 1970-01-01
    • 2017-02-04
    • 1970-01-01
    相关资源
    最近更新 更多