AgustinCB / docker-api

Docker Remote API driver for node.js. It uses the same modem than dockerode, but the interface is promisified and with a fancier syntax.
GNU General Public License v3.0
306 stars 50 forks source link

Running exec on existing container #64

Closed dejanmilosevic0 closed 3 years ago

dejanmilosevic0 commented 5 years ago

How can I run exec on existing container by container name?

Thank you very much.

AgustinCB commented 3 years ago

You can use the inspect API (https://docs.docker.com/engine/api/v1.24/#31-containers) with name. In this framework, the method Container.status does that.