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

How to get commands logs #52

Closed rafaelnovello closed 3 years ago

rafaelnovello commented 6 years ago

Hi guys!

I would like to know if there is another way to get the logs from commands executions other than reading log files like this: https://github.com/AgustinCB/docker-api/blob/master/examples/commands_and_kill.js#L15

Thanks for any help!

kaidonato commented 5 years ago

up!

AgustinCB commented 3 years ago

It depends on what you mean by command executions.

If you are asking for a log of the command API executed in a container, you will have to check the logs of the docker engine: https://stackoverflow.com/questions/40347747/were-are-the-docker-remote-api-logs-stored

If you are asking for a log of the bash commands executed in a container, you will have check the history logs of the containers as the example provides.

There is no special API to get logs from the engine itself.