diff --git a/build/actions/local/scan.js b/build/actions/local/scan.js index 141057b4..f79e5e71 100644 --- a/build/actions/local/scan.js +++ b/build/actions/local/scan.js @@ -58,6 +58,14 @@ limitations under the License. startMessage: 'Scanning for local resinOS devices..', stopMessage: 'Reporting scan results' }); + }).filter(function(arg) { + var address, docker; + address = arg.address; + docker = new Docker({ + host: address, + port: 2375 + }); + return docker.infoAsync()["return"](true).catchReturn(false); }).tap(function(devices) { if (_.isEmpty(devices)) { throw new Error('Could not find any resinOS devices in the local network'); diff --git a/lib/actions/local/scan.coffee b/lib/actions/local/scan.coffee index d119e988..cf20c410 100644 --- a/lib/actions/local/scan.coffee +++ b/lib/actions/local/scan.coffee @@ -72,6 +72,9 @@ module.exports = promise: discover.discoverLocalResinOsDevices(options.timeout) startMessage: 'Scanning for local resinOS devices..' stopMessage: 'Reporting scan results' + .filter ({ address }) -> + docker = new Docker(host: address, port: 2375) + docker.infoAsync().return(true).catchReturn(false) .tap (devices) -> if _.isEmpty(devices) throw new Error('Could not find any resinOS devices in the local network')