jenkins docker agent

hi guys. a few days ago I started to face an error for the docker cloud. I have configured a docker cloud that raises containers with an ubuntu image (with ssh dependencies, java 17) and on which I run my jenkins scripts. For several days now, if I run a script on such an agent, it takes 3-4 minutes and then returns the following error:
14:24:50 java.io.EOFException
14:24:50 at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2915)
14:24:50 at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3410)
14:24:50 at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:954)
14:24:50 at java.base/java.io.ObjectInputStream.(ObjectInputStream.java:392)
14:24:50 at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:49)
14:24:50 at hudson.remoting.Command.readFrom(Command.java:142)
14:24:50 at hudson.remoting.Command.readFrom(Command.java:128)
14:24:50 at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
14:24:50 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61)
14:24:50 Caused: java.io.IOException: Unexpected termination of the channel
14:24:50 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
14:24:50 Caused: java.io.IOException: Backing channel ‘jenny_uat-000f0yn3xvrbr’ is disconnected.
14:24:50 at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:215)
14:24:50 at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
14:24:50 at jdk.proxy2/jdk.proxy2.$Proxy90.isAlive(Unknown Source)
14:24:50 at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1212)
14:24:50 at hudson.Launcher$RemoteLauncher$ProcImpl.join(Launcher.java:1204)
14:24:50 at hudson.tasks.CommandInterpreter.join(CommandInterpreter.java:195)
14:24:50 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:145)
14:24:50 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:92)
14:24:50 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
14:24:50 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
14:24:50 at hudson.model.Build$BuildExecution.build(Build.java:199)
14:24:50 at hudson.model.Build$BuildExecution.doRun(Build.java:164)
14:24:50 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
14:24:50 at hudson.model.Run.execute(Run.java:1895)
14:24:50 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
14:24:50 at hudson.model.ResourceController.execute(ResourceController.java:101)
14:24:50 at hudson.model.Executor.run(Executor.java:442)
14:24:50 FATAL: Unable to delete script file /tmp/jenkins10958888723677225714.sh
14:24:50 java.io.EOFException
14:24:50 at java.base/java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2915)
14:24:50 at java.base/java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3410)
14:24:50 at java.base/java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:954)
14:24:50 at java.base/java.io.ObjectInputStream.(ObjectInputStream.java:392)
14:24:50 at hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:49)
14:24:50 at hudson.remoting.Command.readFrom(Command.java:142)
14:24:50 at hudson.remoting.Command.readFrom(Command.java:128)
14:24:50 at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
14:24:50 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:61)
14:24:50 Caused: java.io.IOException: Unexpected termination of the channel
14:24:50 at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:75)
14:24:50 Caused: hudson.remoting.ChannelClosedException: Channel “hudson.remoting.Channel@2264b9bd:jenny_uat-000f0yn3xvrbr”: Remote call on jenny_uat-000f0yn3xvrbr failed. The channel is closing down or has closed down
14:24:50 at hudson.remoting.Channel.call(Channel.java:996)
14:24:50 at hudson.FilePath.act(FilePath.java:1192)
14:24:50 at hudson.FilePath.act(FilePath.java:1181)
14:24:50 at hudson.FilePath.delete(FilePath.java:1728)
14:24:50 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:163)
14:24:50 at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:92)
14:24:50 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
14:24:50 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
14:24:50 at hudson.model.Build$BuildExecution.build(Build.java:199)
14:24:50 at hudson.model.Build$BuildExecution.doRun(Build.java:164)
14:24:50 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
14:24:50 at hudson.model.Run.execute(Run.java:1895)
14:24:50 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
14:24:50 at hudson.model.ResourceController.execute(ResourceController.java:101)
14:24:50 at hudson.model.Executor.run(Executor.java:442)
14:24:50 Build step ‘Execute shell’ marked build as failure

you can try this image
jenkins/agent:alpine-jdk11
or
[jenkins/agent]
this link maybe is useful for you