mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 17:33:21 +08:00
Ctrl-m is enter :S
This commit is contained in:
@@ -56,7 +56,7 @@ func DeleteNetwork(id string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CreateExecConnection(id string, ctx context.Context) (string, error) {
|
func CreateExecConnection(id string, ctx context.Context) (string, error) {
|
||||||
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sh"}, DetachKeys: "ctrl-m,ctrl-o,ctrl-b,ctrl-y"}
|
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sh"}, DetachKeys: "ctrl-x,ctrl-x"}
|
||||||
resp, err := c.ContainerExecCreate(ctx, id, conf)
|
resp, err := c.ContainerExecCreate(ctx, id, conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@@ -66,7 +66,7 @@ func CreateExecConnection(id string, ctx context.Context) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func AttachExecConnection(execId string, ctx context.Context) (*types.HijackedResponse, error) {
|
func AttachExecConnection(execId string, ctx context.Context) (*types.HijackedResponse, error) {
|
||||||
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true, DetachKeys: "ctrl-m,ctrl-o,ctrl-b,ctrl-y"}
|
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true, DetachKeys: "ctrl-x,ctrl-x"}
|
||||||
conn, err := c.ContainerExecAttach(ctx, execId, conf)
|
conn, err := c.ContainerExecAttach(ctx, execId, conf)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user