lib/plugins/aws/invokeLocal/index.js/AwsInvokeLocal/buildDockerImage
class AwsInvokeLocal:  buildDockerImage(layerPaths) {
    const runtime = this.getRuntime();


    const imageName = 'sls-docker';

    return new BbPromise((resolve, reject) => {
      let dockerfile = `FROM lambci/lambda:${runtime}`;
      for (const layerPath of layerPaths) {
        dockerfile += `\nADD --chown=sbx_user1051:495 ${layerPath} /opt`;
      }
      mkdirp.sync(path.join('.serverless', 'invokeLocal'));
      const dockerfilePath = path.join('.serverless', 'invokeLocal', 'Dockerfile');
      fs.writeFileSync(dockerfilePath, dockerfile);
      this.serverless.cli.log('Building Docker image...');
      const docker = spawn('docker', ['build', '-t', imageName,
        `${this.serverless.config.servicePath}`, '-f', dockerfilePath]);
      docker.on('exit', error => (error ? reject(error) : resolve(imageName)));
    });
  }