Attaching on container start when using the API. #21254
-
Hello, is there any way to attach the standard IO when starting a container using the API? I thought of starting the container as paused and then attaching with a separate request The only alternative I see now is creating the container with a sleep process In general the use case is the same as would be for the Thank you in advance for any help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
yes you can use the attach API which is what In API testing I see: 20-containers.at:t POST "containers/foo/attach?logs=true&stream=false" 200 I guess you might want to set stream=true. |
Beta Was this translation helpful? Give feedback.
yes you can use the attach API which is what
podman --remote container start --attach
is using.In API testing I see:
20-containers.at:t POST "containers/foo/attach?logs=true&stream=false" 200
20-containers.at:t POST "/v1.42/containers/foo/attach?logs=true&stream=false" 200
20-containers.at:t POST "/v4.6.0/libpod/containers/foo/attach?logs=true&stream=false" 200
20-containers.at:t POST "/v4.7.0/libpod/containers/foo/attach?logs=true&stream=false" 200
I guess you might want to set stream=true.