LoginSignup
22
20

More than 5 years have passed since last update.

docker-1.10.0からデタッチキーが変更できるようになった

Posted at

docker run, docker exec, docker attach`でコンテナ内入った後、デタッチするにはCtrl-P, Ctrl-Qでデタッチできますが、このキーバインドが1.10.0から変更できるようになっていました。Ctrl-PはEmacsキーバインドでシェル使う人の場合、「一つ前の履歴を表示する」操作に該当します。多用するので、コンテナ内でのシェル操作が非常にやりにくかったのです。

変更方法

~/.docker/config.jsonにdetachKeysディレクティブを追加します。

{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "******************************",
                        "email": "********************"
                }
        },
        "detachKeys": "ctrl-e,e"        <======== これ
}

オフィシャルのドキュメントにも書いてあります。
https://docs.docker.com/engine/reference/commandline/cli/

22
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
20