Use a temp socket to receive the console from runc
This greatly reduce the risk that we will hit the unix socket maximum path length. Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
@@ -117,10 +117,10 @@ func newInitProcess(context context.Context, plat platform, path, namespace stri
|
||||
io runc.IO
|
||||
)
|
||||
if r.Terminal {
|
||||
if socket, err = runc.NewConsoleSocket(filepath.Join(path, "pty.sock")); err != nil {
|
||||
if socket, err = runc.NewTempConsoleSocket(); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create OCI runtime console socket")
|
||||
}
|
||||
defer os.Remove(socket.Path())
|
||||
defer socket.Close()
|
||||
} else {
|
||||
if io, err = runc.NewPipeIO(0, 0); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to create OCI runtime io pipes")
|
||||
|
Reference in New Issue
Block a user