I'm trying to filter events by type=container, but this doesn't seem to work:
docker.events({
since: ((new Date().getTime() / 1000)).toFixed(0),
filter: {
type: 'container'
}
}).then(stream => {
stream.on('data', data => {
const event = JSON.parse(data.toString());
logger.info(`DOCKER EVENT: Type=${event.Type} status=${event.status} from=${event.from}`);
});
});
With the above code, I still get all event types.
I'm trying to filter events by
type=container, but this doesn't seem to work:With the above code, I still get all event types.