Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let message = `image '${image}' is not whitelisted.`;
log.error(message);
let resultSummary = {
passed: false,
url: 'https://github.com/apocas/dockerode',
message: message
};
task.results = resultSummary;
return Promise.reject(task);
}
log.info(`Starting local docker container '${image}' to run: ${command}`);
let docker = new Docker();
let that = this;
return this.pullImage(docker, image)
.then(() => {
return docker.createContainer({
Image: image,
Cmd: command,
Env: this.formatEnv(env)
});
})
.then(container => {
return container.start();
})
.then(container => {