docker 2024-06-19

has anyone used the :ContainerExec operation with Contajners ? For me it only returns an :Id but no output

its returning the id as the api expects. you may need to attach to the stdin, err and try the https://docs.docker.com/engine/api/v1.45/#tag/Exec/operation/ExecInspect after that

when the exec instance is started, using the logs api should get you the logs

thanks how do I provide switches like -d and -i ?

The -d should be the detach option when starting the exec I think and the -I should be the tty I think. I havenโ€™t tried it, just educated guesses. I helps if you look up the rest api docs rather than the cli usage. The CLI hides a lot of calls for you and has a different UX

๐Ÿ™ 1

thanks, I'm learning Docker so I need to work out how docker run translates into steps with the engine api

its quite a fun journey! took me a while too

run for example is pull + container create + container start (with options to attach etc)

๐Ÿ‘ 1

contajners maps to the api as the usage is via a language and has lower building blocks vs the CLI which is more abstract. also i can more easily follow their version changes and things like support other things like podman with a single clojure interface