mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 09:53:21 +08:00
Revert "Don't allocate a pseudo tty for shell attaches"
This reverts commit d87e288f6f
.
This commit is contained in:
@@ -54,7 +54,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{AttachStdin: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sh"}}
|
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true, Cmd: []string{"sh"}}
|
||||||
resp, err := c.ContainerExecCreate(ctx, id, conf)
|
resp, err := c.ContainerExecCreate(ctx, id, conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
@@ -64,7 +64,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{AttachStdin: true, AttachStderr: true, AttachStdout: true}
|
conf := types.ExecConfig{Tty: true, AttachStdin: true, AttachStderr: true, AttachStdout: true}
|
||||||
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